P1163 Bank Loan
Description
After a person takes out a bank loan, he or she must repay a fixed monthly installment over a period of time. This problem asks you to compute the interest rate paid to the bank by the borrower. Assume the interest is compounded monthly.
Input Format
Three positive integers separated by spaces.
The first integer is the original loan principal $w_0$, the second integer is the fixed monthly installment amount $w$, and the third integer is the total number of months $m$ required to fully repay the loan.
Output Format
Output a real number representing the monthly interest rate (as a percentage), rounded to the nearest 0.1%.
It is guaranteed that the answer does not exceed 300.0%.
Explanation/Hint
It is guaranteed that $1 \leq w_0, w \leq 2^{31} - 1$ and $1 \leq m \leq 3000$.
Translated by ChatGPT 5