No.46 The First n Steps
問題文最終更新日: 2026-06-25 10:44:47
English (AI translation)
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 41
(順位表)
の他の問題:
Problem Statement
You can walk exactly a centimeters in one step.
What is the minimum number of steps needed to walk a section of b centimeters?
Note that you may overshoot the section.
Input
a b
Both a and b are positive integers. \((1\le a,b \le 10^{9}) \)
Output
Output the number of steps. Do not forget the newline at the end.
Sample
Sample 1
Input
2 5
Output
3
One step is 2 centimeters, and you walk a section of 5 centimeters.
Advancing 4 centimeters in 2 steps falls short of the 5-centimeter section.
Advancing 6 centimeters in 3 steps goes past the 5-centimeter section.
Sample 2
Input
10 100
Output
10
One step is 10 centimeters, and you walk a section of 100 centimeters.
Advancing 100 centimeters in 10 steps walks the section exactly.
Sample 3
Input
123456789 987654321
Output
9
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
nmnmnmnmnmnmnm