No.3295 Buying Bottled Water
Problem Statement
Kurage wants to drink $N$ ml of water today.
From now on, by repeatedly buying PET bottles containing $500$ ml of water, $1$ bottle at a time, Kurage intends to make the shortfall of the water on hand relative to the amount of water Kurage wants to drink less than $100$ ml.
Given that the amount of water Kurage currently has is $0$ ml, what is the minimum number of bottles Kurage needs to buy?
Assume that an unlimited number of bottles are on sale.
Constraints
- $ 0 \leq N \leq 10^9 $
- All inputs are given as integers.
Input
$N$
Output
Output the number of bottles of water Kurage should buy, on $1$ line.
Sample
Sample 1
Input
700
Output
2
Buying $1$ bottle of water allows drinking only $500$ ml, but buying $2$ bottles allows drinking $1000$ ml. Therefore, Kurage buys $2$ bottles of water, so output $2$.
Sample 2
Input
550
Output
1
Buying $1$ bottle of water allows drinking only $500$ ml, but the shortfall relative to the desired amount of $550$ ml is $50$ ml, so Kurage does not buy any more water. Therefore, output $1$.
Sample 3
Input
2300
Output
5
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
くらげ
sepa38