#d2708. 高利贷
高利贷
Loan Shark
Problem Description
A 19-year-old college student, little , is in a tough financial situation and his monthly allowance is not enough to buy a smartphone. When he learns that there are lending institutions offering small loans with equal monthly installment repayments, requiring only a few hundred yuan per month, his vanity drives him to start his loan journey.
The lending institution claims that interest accrues monthly, and the borrower repays a fixed installment amount each month during the loan period.
Given the principal of little 's loan, the monthly installment , and the total number of months needed to pay off the loan, find the monthly interest rate of this loan.
Input Format
Three space-separated positive integers , , , as described above.
Output Format
One real number , the monthly interest rate of the loan (as a decimal). An absolute error from the standard output not exceeding is acceptable.
Sample Input 1
1000 1200 1
Sample Output 1
0.200000
Sample Input 2
1000 100 12
Sample Output 2
0.029229
Sample Explanation
For the first sample, little borrows yuan and pays yuan one month later to pay off the loan. So the formula for the monthly interest rate is or , giving .
For the second sample, little borrows yuan and pays yuan per month, paying it off after months. Due to the monthly interest rate, the amount he repays in the -th month is equivalent to only yuan of the initial amount, and these months together repay an initial amount of yuan, giving .
Constraints
,