Back
Close

Paying Compound Interest

Statement

 Goal

You borrowed N dollars from the bank. The compound interest accrues I % each month. You will pay the interest in M months. Then how many $s you have to pay to the bank after M months?
The result will be always an integer.
Input
Line 1: Integers N,I,M
Output
Line 1: The amount of the money you have to pay to the bank
Constraints
0 ≤ N ≤ 10000
0 ≤ I ≤ 100
0 ≤ M ≤ 12
0 ≤ the result ≤ 10000
Example
Input
200 50 2
Output
450

Game modes
Fastest, Shortest

Test cases
Test 1 Test
Input
200 50 2
Output
450

Validator 1 Validator
Input
400 50 3
Output
1350

Test 2 Test
Input
8000 5 3
Output
9261

Validator 2 Validator
Input
4000 5 2
Output
4410

Test 3 Test
Input
100 0 5
Output
100

Validator 3 Validator
Input
200 0 3
Output
200

Test 4 Test
Input
0 5 10
Output
0

Validator 4 Validator
Input
0 10 5
Output
0

Solution language

Solution

Stub generator input