0

I am getting an NZEC error in code chef promblem

I am getting an NZEC error in code chef for the following code, this code runs fine in python shell but does'nt work for code chef the link to promblem is https://www.codechef.com/CIU2018/problems/C001/ code:- n=input() l=[] temp=[[]] for _ in range(int(n)): c=input().split() if c[0]=="1": for i in c[1]: l.append(i) temp.append(l[:]) elif c[0]=="2": for _ in range(1,int(c[1])+1): del l[-1] temp.append(l[:]) elif c[0]=="3": print(l[int(c[1])-1]) elif c[0]=="4": l=temp[-2] del temp[-1]

3rd Jul 2018, 9:05 AM
Jayesh Bhushan
Jayesh Bhushan - avatar
1 Answer
+ 2
i dont get it, what this script goal? its unclear question, so dont devote me
6th Jul 2018, 1:47 PM
Kevin AS
Kevin AS - avatar