Stairs or Elevator
CodeChefOpen on judge ↗
Shark Aman needs to Reach the Sharktank office which is on Floor $N$. There are $2$ Ways to Reach there by $Stairs$ or using a $Lift$ which connects Each $Floor$ from the $Ground$ $Floor$ to the $Nth$ Floor(eg: 0-1,1-2,2-3,..(n-1)-n). Aman is Very Fit and he can climb $One$ Floor in $X$ minutes and needs $Y$ units of $Energy$ to climb $One$ Floor. In the Beginning, Aman has $Z$ units of energy. Th
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