#d2708. 高利贷

高利贷

Loan Shark

Problem Description

A 19-year-old college student, little LL, 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 nn of little LL's loan, the monthly installment mm, and the total number of months kk needed to pay off the loan, find the monthly interest rate pp of this loan.

Input Format

Three space-separated positive integers nn, mm, kk, as described above.

Output Format

One real number pp, the monthly interest rate of the loan (as a decimal). An absolute error from the standard output not exceeding 10−610^{-6} 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 LL borrows 10001000 yuan and pays 12001200 yuan one month later to pay off the loan. So the formula for the monthly interest rate pp is 1000×(1+p)=12001000 \times (1+p) = 1200 or 12001+p=1000\frac{1200}{1+p} = 1000, giving p=0.200000p = 0.200000.

For the second sample, little LL borrows 10001000 yuan and pays 100100 yuan per month, paying it off after 1212 months. Due to the monthly interest rate, the amount he repays in the kk-th month is equivalent to only 100(1+p)k\frac{100}{(1+p)^k} yuan of the initial amount, and these 1212 months together repay an initial amount of 10001000 yuan, giving p=0.029229p = 0.029229.

Constraints

1≤n,m≤1061 \leq n, m \leq 10^6, 1≤k≤3001 \leq k \leq 300

0≤p≤50 \leq p \leq 5

n≤m×kn \leq m \times k