Financial Freedom 2

Xem dạng PDF

Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input: stdin
Output: stdout

Nguồn bài:
Hà Minh Ngọc
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

Nam is still young but has managed to save a large amount of money. He wants to determine whether that amount is sufficient for financial freedom. The calculation is based on the following criteria: Nam invests the entire amount he has into a safe investment channel with an annual interest rate of ~r\%~. At the end of this year, Nam will withdraw an amount ~C~ to cover his expenses for one year. In the following years, Nam will withdraw an increasing amount based on the inflation rate of ~f\%~ per year ~(f < r)~. Nam wants to ensure that he can continue withdrawing money like this indefinitely. Calculate the minimum amount of money Nam needs to have.

Note: The unit of measurement is in millions. Being able to withdraw money at least ~10000~ years is considered indefinite.

Input

  • The only line contains ~2~ real numbers ~r~ and ~f~, and an integer ~C~ ~(0 < f < r ≤ 20, 0 < C ≤ 1000)~.

Output

  • Calculate the minimum amount of money Nam needs to have (rounded to the nearest integer).

Sample Input

5 3 200

Sample Output

10000

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.