DRUNK WALK
CodeChefOpen on judge ↗
Recently, Chef had invested a big amount in Crypto, But just after one week of investment Crypto market fell down. He tries to forget his big loss by alcohol and gets very drunk. Now he wants to return home but is unable to walk straight. For every 3 steps forward, he ends up walking one step backward. Formally, in the 1st second he moves 3 steps forward, in the 2nd second he moves 1 step backwa
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