Given a list of numbers, stop processing input after cummulative sum of all the input becomes negative

There is time limit error in test case 2. I run test case 2 input.
It matches the same output of your given test case 2 output.
Please give me the solution of the code or please tell my error
Here is the ide link:
https://ide.codingblocks.com/s/50019

https://ide.codingblocks.com/s/50115

1 Like