bzoj#P1755. [Usaco2005 qua]Bank Interest

[Usaco2005 qua]Bank Interest

题目描述

Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make.

He knows the interest rate RR that is compounded annually at his bank. He has an integer amount of money MM. He knows how many years YY he intends to invest the money in the bank. Help him learn how much money he will have in the future by compounding the interest for each year he saves.

Print an integer answer without rounding. Answers for the test data are guaranteed to fit into a signed 3232 bit integer.

输入格式

  • Line 11: Three space-separated integers: RR, MM, and YY.

输出格式

  • Line 11: A single integer that is the number of dollars FJ will have after YY years.
5 5000 4
6077

样例说明

5%5\% annual interest, 50005000 money, 44 years.
Year 11: 1.05×5000=52501.05 \times 5000 = 5250.
Year 22: 1.05×5250=5512.51.05 \times 5250 = 5512.5.
Year 33: 1.05×5512.50=5788.1251.05 \times 5512.50 = 5788.125.
Year 44: 1.05×5788.125=6077.531251.05 \times 5788.125 = 6077.53125.
The integer part of 6077.531256077.53125 is 60776077.

数据规模与约定

对于 100%100\% 的数据:0R200\leq R\leq 20100M106100\leq M\leq 10^60Y4000\leq Y\leq 400

题目来源

Usaco2005 qua