Where am i going wrong?

Can somebody please tell where am i going wrong?

Also i am getting an error of .000000003 with this test case 2
100 5 10
100 1 50 . Why?
LINK Solution 1 -https://www.codechef.com/viewsolution/19337708
.Solution-2 https://www.codechef.com/viewsolution/19337917

Use double instead of float and check.

You forgot to print each answer in a new line. Hope it helps :slight_smile:

1 Like

i tried. Infact i changed the entire code from for loop to while loop but nothing helped. modified code link - https://www.codechef.com/viewsolution/19337917

yes that was it. thank you so much.Also it wasn’t an error of 0.000003 but 3 was the next input. Stupid me :}. Thanks again.

cool, you can mark the answer as “accepted”