← All problemsSign in

Lose A Phone

Shivam has a certain affinity towards mobile phones. However, due to his careless nature, he tends to lose them just as quickly as he buys them. Luckily for him his friend Ram is ready to help him out. Ram notices that every phone Shivam has purchased has a number N written on it. Furthermore, due to his habit of rushing into conclusions, Ram thinks he has noticed a pattern in these phone losses.

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