Runtime Error for 'COOMILK' on CodeChef (Python 3.4) -
hi new python programming here. practicing on www.codechef.com not able find solution error on code.
i using python 3.4, trying solve problem https://www.codechef.com/problems/coomilk
while code running on idle giving runtime error when trying submit code. tried searches , first fixed eoferror getting on compilation not able fix runtime error.
t = int(input()) loop in range(t): failed = false n = int(input()) activities = input().split() check in range(n): if len(activities)==1 , activities[check]== 'cookie': print ("no") failed = true elif activities[check] == 'cookie' , activities[check+1]!= 'milk': print ("no") failed = true if not failed: print("yes")
it great if me out in finding out problem, have checked code providing input required , giving desired output somehow giving runtime error on submission.
i appreciate suggestions on improving code. thank :)
Comments
Post a Comment