Submit | All submissions | Best solutions | Back to list |
EIBANKLOAN2 - Bank Loan 1 |
Mr. Huy wants to buy a new house worth X VND, so he decided to take out a bank loan with an interest rate of r% per year. He calculates that he could pay a maximum of Y VND per month (includes principal and interest). How long would he pay off his loan?
Input
The only line contains 2 integers X, Y and a real number r (0 < X, Y < 1012, 0 < r ≤ 100).
Output
A number indicating which month he pays off his loan.
Sample
Input |
Output |
1000000000 100000000 6 |
11 |
500000000 100000000 6.2 |
6 |
Added by: | Ha Minh Ngoc |
Date: | 2022-12-25 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |