#P1163. 银行贷款

银行贷款

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 w0w_0, the second integer is the fixed monthly installment amount ww, and the third integer is the total number of months mm 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%.

1000 100 12

2.9

Hint

It is guaranteed that 1w0,w23111 \leq w_0, w \leq 2^{31} - 1 and 1m30001 \leq m \leq 3000.

Translated by ChatGPT 5