BlueBook - Interest

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem types
BlueBook

Suppose that a certain amount of money N (0N1000000) is deposited in a bank account that pays interest at the rate of M% (1M10). The interest is paid annually so at the end of each year, M% of the amount currently in the account is added to the amount. Assume that the number of years will be from 0 to 50.

Input Specification

The input will be listed on a single line starting with a decimal number N followed by M followed by Y (the number of years).

Output Specification

The output will be the year followed by the amount of money.

Sample Input 1

Copy
1000 8 3

Sample Output 1

Copy
0 1000.00
1 1080.00
2 1166.40
3 1259.71

Sample Input 2

Copy
20 8 0

Sample Output 2

Copy
0 20.00

NOTE: The amount of money must be rounded to 2 decimal places.


Comments

There are no comments at the moment.