Popsicles challenge | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Popsicles challenge

Hello everybody. I had tried multiple codes for solve this challenge, but no one pass the 5th (hidden) test. Could you explain why. P.S. I had tried codes from answers in another discussions about this challenge, but no one pass all tests. https://code.sololearn.com/c1n2jOa62Hn0 https://code.sololearn.com/cGjKASx1RPp7 https://code.sololearn.com/cp15hUWr65em

7th Nov 2020, 1:47 PM
Oleg
Oleg - avatar
5 Answers
+ 2
Try to change line 10 if (siblings <= popsicles && popsicles from "<" to "<="
7th Nov 2020, 2:19 PM
Coding Cat
Coding Cat - avatar
+ 2
Thanks Coding CAT. I was so close) The 1st code is really mine and I proud about it)
7th Nov 2020, 2:23 PM
Oleg
Oleg - avatar
0
Version 2 works well. It passed all test cases.
7th Nov 2020, 2:00 PM
Coding Cat
Coding Cat - avatar
0
Sorry. The second code is really works (type it again). But the second code doesn't consider zero division. First code does. But what is wrong with 1st code? What the 5th Test really checks?
7th Nov 2020, 2:11 PM
Oleg
Oleg - avatar
0
Yes, Oleg this one looks good
7th Nov 2020, 2:26 PM
Coding Cat
Coding Cat - avatar