舊少打幾個字
但根本問題還在
try:
n=int(input())
while True:
x,y,z,w,n,m=map(int,input().split())
p=0
rb=input().split()
for i in rb:
m-=p*n
if m<= 0:
print('bye~Rabbit')
elif i=='0':
m+=0
elif i=='1':
m+=x
elif i=='2':
m+=y
elif i=='3':
m-=z
elif i=='4':
m-=w
p+=1
if m>0:
print('%dg'%(m))
except EOFError:
pass