| Felix Halim .NET | |||||||||||||||||||||||||||||||||||||||||
|
University experience
IOI 2002 Yong In, Korea
|
|||||||||||||||||||||||||||||||||||||||||
1st term: He should pay $9,701 ($2,100 for interest payment, and $7,601 for principal payment) Interest Payment : 5% x $42,000 = $2,100 Principal Payment : $9,701 - $2,100 = $7,601 Current Principal : $42,000 - $7,601 = $34,399 2nd term: He pays $9,701 ($1,702 for interest payment, and $7,981 for principal payment) Interest Payment : 5% x $34,399 = $1,720 Principal Payment : $9,701 - $1,720 = $6,902 Current Principal : $34,399 - $6,902 = $26,418, and so on. Unfortunately, the professor is terrible with financial stuffs. We don’t want him to end up broke, do we? So, let us help him with the calculation on how much money he should spend to pay his monthly bills on the loan. In that way, the professor will be able to buy his new house and who knows that someday we might be invited to visit his house in return to our help. Input SpecificationThe input contains multiple cases. Each case consists of three integers respectively, N (1<=N<=10,000,000) the initial principal, M (1<=M<=100) the period, and R (0<=R<=100) the percent rate.Output SpecificationFor each case, you should output in a single line the total monthly payment should be made to satisfy the condition.Sample Input42000 5 5 100000 10 10 Sample Output9701 16275 Problem Setter: Bong Win Ce Kembali ke pembahasan soal ini Lihat problem lain: |
|||||||||||||||||||||||||||||||||||||||||