Submit | All submissions | Best solutions | Back to list |
EIUBHOUSE - Home Loan |
An wants to buy a new house worth N VND but has only M VND so he can borrow from the bank with interest rate of X% for K months. The debt should be paid equivalently every month. However, he also needs to pay interest of the unpaid debt.
Please help him to calculate how much he needs to pay every month.
Input
The only line contains 3 integers N, M, K and a real number X (0 < N, M < 1012, 0 < K < 500, 0 < X ≤ 100).
Output
For each month, from 1 to K, output the index and the amount of money An have to pay.
Sample
Input |
Output |
1000000000 0 12 0.9
|
1 92333333 2 91583333 3 90833333 4 90083333 5 89333333 6 88583333 7 87833333 8 87083333 9 86333333 10 85583333 11 84833333 12 84083333 |
Added by: | Ha Minh Ngoc |
Date: | 2020-12-23 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |