← All problemsSign in

The Dirty Experiment

Mr Vicky is conducting an experiments on shrimps. He puts a number of beakers in a row numbered from 1 to N. He places 1 shrimp in the first beaker. Then he adds the number of shrimps in this beaker to the next two beakers. Formally, he adds the number of shrimps in beaker i to beaker i+1 and i+2 without removing any from i. This action is performed for beakers upto N-1 such that his N beakers are

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