Doubt on SIMPLE INPUT problem

i have written this code in python for solving this problem

def fn(n):
s=0
for i in range(n):
j=int(input())
s=s+j
if (s>0):
print(j)
else:
break

fn(1000000)

and all test cases except test case 3 are being satisfied. what could be the possible region?

Hi @Aakash-Paul-2182317181860728
You have done all correct, except a minor thing. you have to print the print till the sum is positive (non negative) and border case here is 0. what if input is 0’s, it should print this as well.
So, in the if statement if (s>=0) use greater than eqaul to sign