← All problemsSign in

Find and win

On a Christmas eve, Santa decides to distribute chocolates to n+1 children standing in a line (numbered 0 to n). Santa gives $p$ chocolates to 0th child, $q$ chocolates to 1st child, $r$ chocolates to 2nd child. He changes the distribution pattern from 3rd child such that, 3rd child gets $a$ times the number of chocolates 2nd child has + $b$ times the number of chocolates 1st child has + $c$ tim

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