How can sum one run
CodeChefOpen on judge ↗
Chef junior recently learnt to code. Today he successfully compiled a code which takes in a stream of integers and prints the running sum. for example, if the input is $1,2,3,4,5$ then his prgram prints $1,3,6,10,15$. Chef junior's code was very simple, he initialised a variable $sum$ with $0$ and on reading an integer input he simply added it to the $sum$ variable and printed it. His co
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