← All problemsSign in

Ladder Slip

There is a ladder of length L you need to exactly reach the Lth position. The problem is climbing N steps will make you fall M steps as the ladder is slippery. You have to decide the first move so that you will reach the end in least number of moves. What will be your first move? Your first move can be between 1 - N Input - The first line of the input contains an integer T denoting the number

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start