why i get NZEC(non zero exit code) on my submission?

i am unable understand why i get this ???
Here is my code CodeChef: Practical coding for everyone

t = int(input())
for j in range(t):
    lis = []
    n = int(input())
    lis = raw_input().split()
    lis = map(int,lis)
    lis.sort(reverse = True)
    coreA = lis[0]
    coreB = 0
    for i in range(1,n):
        if coreA > coreB:
            coreB = coreB+lis[i]
        else:
            coreA = coreA+lis[i]
    print abs(coreA-coreB)

write
return 0; at the end of code.
for e.g
int main()
{
printf(“NZEC”);
return 0;
}

5 Likes

NZEC is due to index out of range or code exit with some error . :slight_smile: by the way thanks for your response

i think there is no need of adding any return 0; since in pyhton it doesn’t need…

1 Like