Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
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 < 10^{12}, 0 < K < 500, 0 < X ≤ 100)~.
Output
- For each month, from ~1~ to ~K~, output the index and the amount of money is rounded that An have to pay.
Sample Input
1000000000 0 12 0.9
Sample Output
1 92333333
2 91583333
3 90833333
4 90083333
5 89333333
6 88583333
7 87833333
8 87083333
9 86333333
10 85583333
11 84833333
12 84083333
Bình luận