← All problemsSign in

Jungle Book

Baloo and Mowgli Both got bored of their games and decided to find a new game. Both are at start (0) initially. Shanti being Mowgli’s girlfriend has an upper hand and decides to make them play to her tunes. She speaks out 2 numbers k1 and k2 for baloo and c1 and c2 for Mowgli. Baloo can jump from his position k1 units ahead or k2 units ahead. Mowgli being someone special enjoys the privilege of

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