Number of Coke
CodeChefOpen on judge ↗
Shannu had been to Goa in his summer holidays. Shannu has to walk a distance of $M$ km to reach his place. As it was too hot Shannu decides to drink a coke after every $N$ km from his start point. At the first $N$ km he drinks 1 coke, at the second $N$ km he drinks 2, at the third $N$ km he drinks 3, he keeps on increasing his drink at every $N$ km till he reaches his destination. How many cokes d
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