Flash vs QuickSilver
CodeChefOpen on judge ↗
Flash and QuickSilver challenge each other to a faceoff. They stand at the top of a huge staircase where the steps are numbered from n down to 1. In a single step, they can step down from stair n to stair n-1. Afraid of losing the challenge, flash bribes the judge and figures out a few tricks. If the stair number n is divisible by 2, he can jump directly to stair numbered n/2 in a single step. If
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