hello everyone this is my code
#l=[['5', '1B', '1B', 'FO', 'GO', '1B'], ['5', '1B', '2B', 'FO', 'FO', 'SO'], ['4', 'SO', 'HR', 'SO', '1B'], ['4', 'FO', 'FO', 'FO', 'HR'], ['4', '1B', '1B', '1B', '1B'], ['4', 'GO', 'GO', '3B', 'GO'], ['4', '1B', 'GO', 'GO', 'SO'], ['4', 'SO', 'GO', '2B', '2B'], ['4', '3B', 'GO', 'GO', 'FO']]
l=[]
for i in range(8+9):
l.append(list(map(str,input().split())))
x=int(input("jameslee is fat"))
def no(now,x):
global count
copy= now[:]
copy[0]=1
for i in range(x):
if now[0]==1:
copy[1]=1
if i!=0:
copy[0]=0
else:
copy[1]=0
if now[1]==1:
copy[2]=1
else:
copy[2]=0
if now[2]==1:
count+=1
now=copy[:]
return now
def run(t,times):
if t[times]=='1B':
return 1
elif t[times]=='2B':
return 2
elif t[times]=='3B':
return 3
elif t[times]=='HR':
return 4
else:
return 0
times=1
now=[0,0,0]
count=0
f=0
n=0
##now=[1,0,0]
##print(no(now,3))
while f!=x:
g=run(l[n],times)
# print(g,l[n],times)
if g==0:
f+=1
if f%3==0:
now=[0,0,0]
else:
now=no(now,g)
n=(n+1)%9
if n==0:
times+=1
# print(now)
print(count)