← All problemsSign in

Getting late

You are a student of XYZ University , and your end-semester exam is going on. You are getting late for your exam and the exam room is on the 4th floor, also the lift is not working. Because of this, you planned to go from the stairs but time is minimum for you to reach the exam room. You can take only one and two steps and the time taken for 1 step is 1.00 sec and 2 steps are 1.50 sec. You have

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