+ 4

Hi I am solving Halloween Candy Problem

import math houses = int(input()) if(houses>=3) : output = 200/houses print(int(round(output,0))) I pass only two test cases 3 and 4 are hidden . Please suggest my code has any bugs

3rd Oct 2020, 8:27 PM
Zaw Zaw Win🇲🇲
Zaw Zaw Win🇲🇲 - avatar
3 Respuestas
+ 3
Use ceil function.. print(int(math.ceil(output)))
3rd Oct 2020, 8:44 PM
Jayakrishna 🇮🇳
+ 1
4th Oct 2020, 11:56 AM
Zaw Zaw Win🇲🇲
Zaw Zaw Win🇲🇲 - avatar
+ 1
Thanks you all for answering my questions.
5th Oct 2020, 9:22 AM
Zaw Zaw Win🇲🇲
Zaw Zaw Win🇲🇲 - avatar