← All problemsSign in

Building Race

CodeChefRating 739Open on judge ↗

Two friends Chef and Chefina are currently on floors $A$ and $B$ respectively. They hear an announcement that prizes are being distributed on the ground floor and so decide to reach the ground floor as soon as possible. Chef can climb down $X$ floors per minute while Chefina can climb down $Y$ floors per minute. Determine who will reach the ground floor first (ie. floor number 0). In case both r

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