問題一覧 > 通常問題

No.3295 Buying Bottled Water

レベル : / AI推定難易度 : 140 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 189
作問者 : くらげ / テスター : hanba-gu1 dyktr_06 Nafmo2 sepa38 おのせ
お気に入りにしたユーザー ProblemId : 12567 / 自分の提出
問題文最終更新日: 2025-10-04 18:50:19
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest MMA Contest 020 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。