My first exercise outside of the schoolarea. I get the output i should according to the examples, but i keep getting wrong answer as result. Is this one of the intricacies of SPOJ i’m not familiar with yet, or is there something wrong with my code?
import math
loanAmount = int(input())
total = 0
capital = loanAmount * 0.02
while loanAmount > 0:
total += math.ceil(capital + loanAmount*0.01)
loanAmount -= capital
print(total)