No.128 Otoshidama (1)
Problem Statement
Yasuo has a budget of $N$ yen and wants to give otoshidama (New Year's gift money) to $M$ children of his relatives.
He wants the otoshidama to consist only of 1000-yen bills, and he wants to give everyone an equal amount (all the same amount) that is as large as possible.
Find the amount of money one person receives in this case.
Input
N M
All inputs are given as integers.
$1\le N \le 10000000000000000=10^{16}$
$1\le M \le 10000=10^{4}$
Output
Output the amount of money given to one person.
Sample
Sample 1
Input
10000 5
Output
2000
The budget is $10000$ yen and it is distributed among $5$ people, so each $1$ person receives $2000$ yen.
Sample 2
Input
24000 9
Output
2000
As long as it is equal, the budget does not have to be used up entirely.
Sample 3
Input
1000 6
Output
0
Since the budget is small, he cannot give otoshidama to anyone.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。