Golf
It's a lockdown. You’re bored in your house and are playing golf in the hallway. The hallway has $N + 2$ tiles numbered from $0$ to $N+1$ from left to right. There is a hole on tile number $x$. You hit the ball standing on tile $0$. When you hit the ball, it bounces at lengths of $k$, i.e. the tiles covered by it are $0, k, 2k, \ldots$, and so on until the ball passes tile $N+1$. If the ball do
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start