AtCoder Beginner Contest 198
翻译中…
Problem Statement
翻译中…
Takahashi is standing at the origin of a two-dimensional plane.
翻译中…
By taking one step, he can move to a point whose Euclidian distance from his current position is exactly $R$ (the coordinates of the destination of a move do not have to be integers). There is no other way to move.
翻译中…
Find the minimum number of steps Takahashi has to take before reaching $(X, Y)$.
翻译中…
We remind you that the Euclidian distance between points $(x_1,y_1)$ and $(x_2,y_2)$ is $\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.
翻译中…
Constraints
翻译中…
$1 \leq R \leq 10^5$$0 \leq X,Y \leq 10^5$$(X,Y) \neq (0,0)$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
R X Y
翻译中…
Output
翻译中…
Print the minimum number of steps Takahashi has to take before reaching $(X, Y)$.
翻译中…
样例
Input #1
5 15 0
Output #1
3
He can reach there in three steps: $(0,0) \to (5,0) \to (10,0) \to (15,0)$. This is the minimum number needed: he cannot reach there in two or fewer steps.

Input #2
5 11 0
Output #2
3
One optimal route is $(0,0) \to (5,0) \to (8,4) \to (11,0)$.

Input #3
3 4 4
Output #3
2
One optimal route is $(0,0) \to (2-\frac{\sqrt{2}}{2}, 2+\frac{\sqrt{2}}{2}) \to (4,4)$.

题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。