Practice - 1 "Sofia the first". Linear Algorithms




Task
Time limit: 1000 ms,
Memory limit: 256 Mb

King Roland II wanted to open a bank account, in order to save the children to study at the university. The king wants to calculate how much he will receive income in \(t\) years, if he deposits into the account of  \(n\) dollars at an equal rate \(p\%\).
Help King Roland II, write a program for him that automates the calculation and allows the King to save time on bank trips. Take into account the effect of capitalization: interest is accrued to the amount initially deposited into the account with the frequency established by the agreement. All banks in the kingdom charge interest annually. With subsequent accruals, interest will be added not only to the deposit amount, but also to previously accrued income.

Input: three integers separated by space :\(t ( 0 < t <= 20)\)\(n ( 0 < n <= 10^9)\) and \(p ( 0 < p <= 100) \)
Output: output one number - the income that the King will receive from investing

Example
Input Output
1 5 10000 10 16105.10

Prohibited statements:if;for;while;until;max;min

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: