Please help me I am stuck. PYTHON CODE
t=int(input()) tc=0 while t>0: n,k=map(int,input().split()) lst=[int(i) for i in input().split()] answer_counter=0 decreasing_counter=0 for i in range(n): if lst[i]==lst[i-1]-1: decreasing_counter+=1 else: deccreasing_counter=0 if lst[i]==1 and decreasing_counter>=k-1: answer_counter+=1 tc+=1 print("Case #"+str(tc)+": "+str(answer_counter)) t-=1 -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/784c04ea-efff-4c3e-87c6-e3be28743366n%40googlegroups.com.