Lazy Chef
CodeChefOpen on judge ↗
Chef is on his way to his first job interview as a SDE at Google, and he is already late. The interview is in a skyscraper and he is currently in floor s, where he sees an elevator. Upon entering the elevator, he learns that it has only two buttons, marked ”UP u” and ”DOWN d”. He concludes that the UP-button takes the elevator u floors up (if there aren't enough floors, pressing the UP-botton does
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