Rush to the Classroom
CodeChefOpen on judge ↗
Sandeep lives closest to college. Yet he is late everyday. What an irony! And his classroom is on the topmost floor of the academic building of the college, to which he needs to climb $N$ stairs. So, in order to reach his classroom and not miss the first class, he jumps stairs while climbing. He can climb either $1$ or $2$ or $3$ steps at a time. But Sandeep is cleverer than you think. He has
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