Back to Problem Solutions forum
Hello my dears, I got stuck at the problem #35 - Savings Calculator. I've revised all kinds of trouble that could been and appear into the code, but I can't be able to know why it dosen't give the correct answer. I suspect that the checker is give an incorret answer.
I suspect that the checker is give an incorret answer.
That's probable :) 2919 persons have solved this incorrectly, then.
Please, don't be evil and give example of what makes you think checker is wrong - input data, your answer and expected answer.
input data:
data = [50, 150, 30, 500, 4000, 5, 50, 500, 4, 25, 375, 3, 10000, 150000, 2, 2500, 45000, 50, 1000, 20000, 1, 2500, 37500, 20, 5000, 70000, 2, 1000, 20000, 2, 5000, 75000, 30, 500, 5500, 9, 10000, 250000, 2, 25, 275, 5, 25, 625, 2, 250, 4000, 15, 5000, 10000, 15]
my answer: 5 43 59 92 137 8 302 15 134 152 11 28 163 50 163 20 5 expected answer: 5 43 59 92 137 8 302 15 134 152 11 28 163 50 164 20 5
Ah, ok, please note problem statement says "rounded DOWN to whole cents", even outlined. Your code rounds differently!
Thanks very much for advice! I was able to solve the problem rounded down to whole cents.