All test-cases not passed

def simpleInput(l, sum1):
for i in range(0, len(l)):
sum1 = sum1 + int(l[i])
if sum1<0:
return
else:
print(l[i])
return

input_string = input()
l = input_string.split()
sum1 = 0
simpleInput(l, sum1)

The sample test case is passed but for the rest of the test cases it says wrong answer. I can’t figure out the error. Please help.

Could you please share your code with IDE CODING BLOCKS.
Also, kindly mention which question is that you are referring to.

Thanks :slight_smile:

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.