-->
当前位置:首页 > 题库

PROGRAMMING:Learning investment

Luz5年前 (2021-05-10)题库350
Xiaobai has learned some knowledge about compound interest investment, and wants to compare how much more money compound interest can earn (the so-called compound interest investment refers to the annual investment principal is the principal plus income of the previous year). Non compound investment refers to the annual investment amount (excluding the income of the previous year, that is, the fixed investment amount). Suppose that he has fixed investment of M yuan (integer) every year, and the annual income reaches P (0 < p < 1, double). Then after n (integer) years, how much more money does compound interest investment earn than non compound interest investment? The calculation process uses double precision floating-point numbers, and the final result is rounded to the output integer (Math's round function).
###Input format:
M P N
###Output format:
Compound interest income (including principal), non compound interest income (including principal), and the part of compound interest income more than non compound interest income (all rounded)
###Input example:
```in
10000 0.2 3
```
###Output example:
```out
17280 16000 1280
```







answer:If there is no answer, please comment