問題一覧 > 通常問題

No.388 Stairs (1)

レベル : / AI推定難易度 : 75 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 1681
作問者 : Tawara / テスター : 37zigen
お気に入りにしたユーザー ProblemId : 961 / 自分の提出
問題文最終更新日: 2022-08-09 12:07:56
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 141 (順位表) の他の問題:

Problem Statement

Stair loves climbing stairs. Today, too, he is climbing his favorite staircase at a temple in his neighborhood.
When he reached step $S$, Stair suddenly wondered which floor of his own house his current height corresponds to.

Given the number of steps $F$ that corresponds to one story of Stair's house, calculate which floor Stair is on now.

Input

$S \ F$ 

The step number $S$ where Stair currently is and the number of steps $F$ corresponding to one story of Stair's house are given, separated by a space.

All inputs are integers and satisfy the following constraints.
$0 \le S \le 456$
$1 \le F \le 123$

Output

Output which floor Stair is on now. Print a newline at the end.

Sample

Sample 1
Input
13 13
Output
2

He has climbed exactly one story, so he is on the 2nd floor.

Sample 2
Input
39 10
Output
4

Stair's head is probably at the height of the 5th floor, but his feet are on the 4th floor, so the answer is the 4th floor.

Sample 3
Input
50 123
Output
1

Perhaps Stair's house is very large, or perhaps each step of the temple's staircase is very low.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。