The logic of the question is not clear

Can you please Explain me the logic.

It is just simple addition.
Consider Sample Input:
INPUT
4
1 0 2 9
5
3 4 5 6 7
OUTPUT
3, 5, 5, 9, 6, END

Consider this:
__1 0 2 9
+34 5 6 7
_________on adding
3 5 5 9 6

Thanks Sir I was Adding from index one that was my mistake.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.