i'm new to python.i have been getting NZEC run time error for this code in codechef. i changed input() to raw_input().can someone explain to me why my code is getting a NZEC error
def function1(list1,sum): if len(list1)==1: return sum m=min(list1) i=list1.index(m) if list1.count(m)>1: sum+=list1.count(m) else: sum+=1 list1=list1[:i] return function1(list1,sum) t=int(raw_input()) global list1 global sum while t>0: n=int(raw_input()) sum=0 list1=list() list1[1:n]=raw_input().split() m=min(list1) i=list1.index(m) if i==0: if list1.count(m)>1: sum+=list1.count(m) else: sum+=1 print(sum) else: k=function1(list1,sum) k+=1 print(k) t-=1