+ 2
Halloween Candy 4/5 using round
I've been trying to beat Code Coach's Halloween Candy challenge today, and in fact I did beat it using ceil in the end. But I kind of wanted to try not to use ceil and came up with the code below. However I can't get the 4th test to pass. Maybe you guys can help me out with this. There isn't any requirement to use ceil, is there? Am I missing something else? https://code.sololearn.com/cLIPy1kvYe5x/?ref=app
5 Answers
+ 2
I guess it's hard to get it to work like this then, ty.
+ 2
I use this, no functions used at all:
if (2 * 100 % houses == 0):
print((2 * 100)//houses)
else:
print((2 * 100)//houses + 1);
+ 2
This is the solution
https://code.sololearn.com/cDgoG7OtyqD1/?ref=app
0
Yh for sure, stupid me.