Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# coding:utf-8

input=raw_input()
list=input.split(" ")
for i in range(len(list)):
    list[i]=int(list[i])

f=list[5]

# xが取り得る値
listx=[]
a=list[0]
b=list[1]

i=0
while True:
   if i*a*100>f:
       break
   j=0
   while True:
      x=i*a*100+j*b*100
      if x > f:
          break;
      if x not in listx:
          listx.append(int(x))
      j+=1 
   i+=1 

# yが取り得る値
listy=[]
c=list[2]
d=list[3]

# yが水に溶け切れる最大値
f2=f*e/(100.0+e)

i=0
while True:
   if i*c>f2:
       break
   j=0
   while True:
      y=i*c+j*d
      if y > f:
          break;
      if y not in listy:
          listy.append(int(y))
      j+=1 
   i+=1 

# 全てのxとyの組み合わせについてfを超えないか、および溶け切れるかを調べる
lengthx=len(listx)
lengthy=len(listy)

xy_max=0
y_max=0
noudo_max=0
for i in range(lengthx):
    for j in range(lengthy):
        x=listx[i]
        y=listy[j]
        if x+y>f:
            continue
        noudo=float(y)/(x+y)
        if noudo>noudo_max:
            xy_max=x+y
            y_max=y
            noudo_max=noudo

print xy_max
print " "
print y_max

Fixed submission:
# coding:utf-8

input=raw_input()
list=input.split(" ")
for i in range(len(list)):
    list[i]=int(list[i])

e=list[4]
f=list[5]

# 1 2 10 20 15 200
# 17 19 22 26 55 2802

# xが取り得る値
listx=[]
a=list[0]
b=list[1]

i=0
while True:
   if i*a*100>f:
       break
   j=0
   while True:
      x=i*a*100+j*b*100
      if x>f:
          break;
      if x==0:
          j+=1
          continue;
      if x not in listx:
          listx.append(int(x))
      j+=1 
   i+=1 

# yが取り得る値
listy=[]
c=list[2]
d=list[3]

# yが水に溶け切れる最大値
f2=f*e/(100.0+e)

i=0
while True:
   if i*c>f2:
       break
   j=0
   while True:
      y=i*c+j*d
      if y>f2:
          break;
      if y not in listy:
          listy.append(int(y))
      j+=1 
   i+=1 

# 全てのxとyの組み合わせについてfを超えないか、および溶け切れるかを調べる
lengthx=len(listx)
lengthy=len(listy)

xy_max=0
y_max=0
noudo_max=0

for i in range(lengthx):
    for j in range(lengthy):
        x=listx[i]
        y=listy[j]
        if x+y>f:
            continue
        if float(y)*100/float(x)<=e:
            noudo=float(y)/(x+y)
            if noudo>=noudo_max:
                xy_max=x+y
                y_max=y
                noudo_max=noudo

message=str(xy_max)+" "+str(y_max)
print message
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
A = sorted(map(int, raw_input().split()), reverse=True)

x = 0
y = 0

def is_lose(x, y):
    return x >= n or y >= A[x]
    
while not is_lose(x+1, y+1):
    x += 1
    y += 1

x_ = x
count_x = 0
while not is_lose(x_+1, y):
    x_ += 1
    count_x += 1
    
y_ = y
count_y = 0
while not is_lose(x, y_+1):
    y_ += 1
    count_y += 1

if (count_x%2 == 0) and (count_y%2 == 0):
    print "Second"
else:
    print "First"

Fixed submission:
n = input()
A = sorted(map(int, raw_input().split()), reverse=True)

x = 0
y = 0

def is_lose(x, y):
    return x >= n or y >= A[x]
    
while not is_lose(x+1, y+1):
    x += 1
    y += 1

x_ = x
count_x = 0
while not is_lose(x_+1, y):
    x_ += 1
    count_x += 1
    
count_y = A[x] - 1 - y

if (count_x%2 == 0) and (count_y%2 == 0):
    print "Second"
else:
    print "First"
Buggy python submission (verdict: Runtime Error):
num=str(input())

char=list(num)

if char[0]=="9":
	print("Yes")
elif char[1]=="9":
	print("Yes"))
else:
	print("No")
  

Fixed submission:
num=str(input())
 
char=list(num)
 
if char[0]=="9":
	print("Yes")
elif char[1]=="9":
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Runtime Error):
hotel=int(input())
hotel2=int(input())
hotel3=int(input())
hotel4=int(input())

sum1=int(hotel)*int(hotel2)
sum2=int(hotel39*int(hotel4)
fee=int(sum1)+int(sum1)

print(str(fee))

Fixed submission:
hotel=int(input())
hotel2=int(input())
hotel3=int(input())
hotel4=int(input())

if hotel > hotel2:
	sum1=int(hotel2)*int(hotel3)
	hotel5=int(hotel)-int(hotel2)
	sum2=int(hotel5)*int(hotel4)
	fee=int(sum1)+int(sum2)
else:
  fee=int(hotel)*int(hotel3)
 
print(str(fee))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())

if c>=b or d<=a:
    print(0)
else:
    if a<=c and b<=d:
        print(b-c)
    elif a<=c and b>d:
        print(d-c)
    elif a>c and b<=d:
        print(b-a)
    else:
        print(d-a)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
d=int(s[3])

if c>=b or d<=a:
    print(0)
else:
    if a<=c and b<=d:
        print(b-c)
    elif a<=c and b>d:
        print(d-c)
    elif a>c and b<=d:
        print(b-a)
    else:
        print(d-a)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())

if c>=b or d<=a:
    print(0)
else:
    if a<=c and b<=d:
        print(b-c)
    elif a<=c and b>d:
        print(d-c)
    elif a>c and b<=d:
        print(b-a)
    else:
        print(d-a)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
d=int(s[3])

if c>=b or d<=a:
    print(0)
else:
    if a<=c and b<=d:
        print(b-c)
    elif a<=c and b>d:
        print(d-c)
    elif a>c and b<=d:
        print(b-a)
    else:
        print(d-a)
Buggy python submission (verdict: Runtime Error):
n = input()
found = 0
for i in n:
        if i == "9":
                print("Yes")
                found = 1
                break

if(!found):
        print("No")


Fixed submission:
n = input()
found = 0
for i in n:
        if i == "9":
                print("Yes")
                found = 1
                break

if(not found):
        print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
print(a[0].upper + b[0].upper, c[0].upper)

Fixed submission:
a, b, c = input().split()
print(a[0].upper() + b[0].upper() + c[0].upper())
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split(sep = ", ")
if(len(a) == 7):
    print(b.lower() + " " + a.lower() + " " + c.lower())
elif(len(b) == 7):
    print(a.lower() + " " + b.lower()  + " " + c.lower())
elif(len(c) == 7):
    print(a.lower() + " " + c.lower() + " " + b.lower*(()


Fixed submission:
a, b, c = input().split(sep = ",")
 
print(a, b, c)

Buggy python submission (verdict: Runtime Error):
a, b, c = input().split(sep = ", ")

print(a + " " + b + " " + c)


Fixed submission:
a, b, c = input().split(sep = ",")
 
print(a, b, c)
Buggy python submission (verdict: Runtime Error):
arr = map(int, input().split())

if((arr[0] + arr[1] + arr[2]) % 2 == 0):
    print("Yes")
else:
    print("No")

Fixed submission:
a, b, c = map(int, input().split())

"""
a + b
a + c
b + c
"""

if(a + b == c):
    print("Yes")
elif(a + c == b):
    print("Yes")
elif(b + c == a):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
arr = map(int, input().split())

if((arr[0] + arr[1] + arr[2]) % 3 == 0):
    print("Yes")
else:
    print("No")

Fixed submission:
a, b, c = map(int, input().split())

"""
a + b
a + c
b + c
"""

if(a + b == c):
    print("Yes")
elif(a + c == b):
    print("Yes")
elif(b + c == a):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
if int(N/10)==9:
        print("Yes")
    elif int(((N-9)%10)) == 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N = int(input())
if int(N/10)==9:
    print("Yes")
elif int(((N-9)%10)) == 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for i in range(N)]
n = N
for i in range(N-1):
	j = i + 1
	while j <= N-1:
		if a[i] != a[j]:
			j += 1
		else:
			n -= 2
			break		
print(n)

Fixed submission:
a = int(input())
b = a // 10
c = a % 10

if b == 9 or c == 9 :
	print("Yes")
else :
	print("No")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = a // 10
c = a % 10

if b == 9 or c == 9
 print("yes")
 else
  print("no")

Fixed submission:
a = int(input())
b = a // 10
c = a % 10

if b == 9 or c == 9 :
	print("Yes")
else :
	print("No")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = a // 10
c= a % 10

if b == 9 or c == 9
 print("Yes")
 else
  print("No")


Fixed submission:
a = int(input())
b = a // 10
c = a % 10

if b == 9 or c == 9 :
	print("Yes")
else :
	print("No")

Buggy python submission (verdict: Runtime Error):
import numpy as np
N=input()
x=[]
dict={}
for i in range(N):
    a=raw_input()
    if a in dict:
        dict[a]+=1
    else:
        dict[a]=1

print np.sum(np.array(dict.values())%2)

Fixed submission:
a=int(raw_input())
ichi_kurai=a/10
jyu_kurai=a%10

if ichi_kurai == 9 or jyu_kurai == 9:
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Time Limit Exceeded):
times = int(raw_input())
numbers = []

for x in xrange(times):
    number = int(raw_input())
    if number not in numbers:
        numbers.append(number)
    else:
        numbers.remove(number)

print len(numbers)

Fixed submission:
times = int(raw_input())
numbers = {}
result = 0

for x in xrange(times):
    number = int(raw_input())
    if number not in numbers:
        numbers[number] = 0
    numbers[number] += 1

for item in numbers:
    if numbers[item] % 2 != 0:
        result += 1

print result
Buggy python submission (verdict: Runtime Error):
import sys

for line in sys.stdin:
    x = int(line.split(' ')[0])
    a = int(line.split(' ')[1])
    b = int(line.split(' ')[2])

# print x, a, b

if abs(x % a) > abs(x % b):
    print 'A'
else:
    print 'B'

Fixed submission:
import sys

a = map(int,raw_input().strip().split(" "))

if abs(a[0] - a[1]) < abs(a[0] - a[2]):
    print 'A'
else:
    print 'B'

Buggy python submission (verdict: Runtime Error):
import sys

x = int(sys.argv[1])
a = int(sys.argv[2])
b = int(sys.argv[3])

if abs(x % a) > abs(x % b):
    print 'A'
else:
    print 'B'

Fixed submission:
import sys

a = map(int,raw_input().strip().split(" "))

if abs(a[0] - a[1]) < abs(a[0] - a[2]):
    print 'A'
else:
    print 'B'
Buggy python submission (verdict: Time Limit Exceeded):
def countPower():
    power = 1
    N = int(input())
    i = 1
    if 1<=N<=10**5:
        while i <= N:
            power = i*power
            i += 1
    return power % (10**9 + 7)


if __name__=="__main__":
    print(countPower())


Fixed submission:
import math

def countPower():
    power = 1
    N = int(input())
    if 1<=N<=10**5:
        power = math.factorial(N)
    return power % (10**9 + 7)

if __name__=="__main__":
    print(countPower())
Buggy python submission (verdict: Time Limit Exceeded):
import sys

def makePuzzle():
    count_Scc = 0
    tmp = sys.stdin.readlines()
    num_s, num_c = tmp[0].split(" ")
    num_s = int(num_s)
    num_c = int(num_c)

    while num_s>=0 and num_c>=0:

        if num_s>=1 and num_c>=2:
            num_s = num_s - 1
            num_c = num_c - 2
            count_Scc = count_Scc + 1
        elif num_c>=4:
            num_c = num_c - 4
            count_Scc = count_Scc + 1
        else:
            break

    return count_Scc

if __name__=="__main__":
    print(makePuzzle())

Fixed submission:
import sys

def makePuzzle():
    count_Scc = 0
    tmp = sys.stdin.readlines()
    num_s, num_c = tmp[0].split(" ")
    num_s = int(num_s)
    num_c = int(num_c)

    if num_c-num_s*2>=0:
        count_Scc = num_s
        num_c = num_c - num_s*2
        count_Scc = count_Scc + num_c//4
    else:
        count_Scc = num_c//2

    return count_Scc

if __name__=="__main__":
    print(makePuzzle())
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=0
for i in range(N):
    a,b=[k for k in input().split()]
    ans+=b-a+1
print(ans)

Fixed submission:
N=int(input())
ans=0
for i in range(N):
    a,b=[int(k) for k in input().split()]
    ans+=b-a+1
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=[int(i) for i in input().split()]
M=[4*a,2*b,c,d/2]
N=int(input())

if M[0]==min(M):
    print(N*M[0])
elif M[1]==min(M):
    print(N*M[1])
elif M[2]==min(M):
    print(N*M[2])
else:
    if N%2==0:
        print(int(N//2*int(M[3]*2))
    else:
        if M[0]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[0])
        elif M[1]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[1])
        elif M[2]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[2])


Fixed submission:
a,b,c,d=[int(i) for i in input().split()]
M=[4*a,2*b,c,d/2]
N=int(input())

if M[0]==min(M):
    print(N*M[0])
elif M[1]==min(M):
    print(N*M[1])
elif M[2]==min(M):
    print(N*M[2])
else:
    if N%2==0:
        print(int(N//2*int(M[3]*2)))
    else:
        if M[0]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[0])
        elif M[1]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[1])
        elif M[2]==min([4*a,2*b,c]):
            print(N//2*int(M[3]*2)+M[2])
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
print(min[a+b,a+c,b+c])

Fixed submission:
number = list(map(int,input().split()))

max = max(number)

number.remove(max)

print(number[0] + number[1])

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
print(min[a+b,a+c,b+c])

Fixed submission:
number = list(map(int,input().split()))

max = max(number)

number.remove(max)

print(number[0] + number[1])
Buggy python submission (verdict: Runtime Error):
N = int(input())

a_n=list(map(int,input().split()))
import sys

i=1
count=0
for k in range(N):
    if a_n[i-1]==2:
        count+=1
        print(count)
        sys.exit()
    else:
        i=a_n[i-1]
        count+=1

print(-1)

Fixed submission:
N = int(input())

a_n=[int(input()) for i in range(N)]
import sys

i=1
count=0
for k in range(N):
    if a_n[i-1]==2:
        count+=1
        print(count)
        sys.exit()
    else:
        i=a_n[i-1]
        count+=1

print(-1)
Buggy python submission (verdict: Runtime Error):
N=int(input())
a_n=[int(x) for i in input().split()]

print(max(a_n)-min(a_n))

Fixed submission:
N=int(input())
a_n=[int(i) for i in input().split()]

print(max(a_n)-min(a_n))
Buggy python submission (verdict: Runtime Error):
N=int(input())
s_n=[int(input()) for i in range(N)]

ans=sum(s_n)
while ans%10==0:
    ans-=min(s_n)
    if ans%10==0:
        ans+=min(s_n)
        s_n.remove(min(s_n))


print(ans)

Fixed submission:
N=int(input())
s_n=[int(input()) for i in range(N)]

ans=sum(s_n)
while ans%10==0:
    if s_n==[]:
        ans=0
        break
    ans-=min(s_n)
    if ans%10==0:
        ans+=min(s_n)
        s_n.remove(min(s_n))


print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int,input().split())

if(B < C or D < A):
	print(0)

else:
	if(A > C):
		E = A
	else:
		E = C

	if(B > D):
		F = D
	else:
		F = B

print(F - E)


Fixed submission:
A, B, C, D = map(int,input().split())

if(B < C or D < A):
	print(0)

else:
	if(A > C):
		E = A
	else:
		E = C

	if(B > D):
		F = D
	else:
		F = B

	print(F - E)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
T = [0]*N

for i in range(N):
	T[i] = int(input())



def A(j, A):

	for k in range(N):

		if(j % A[k] > 0):
			break

		elif(k == N - 1):
			return 1

	return 0


j = 1

while(True):

	if(A(j, T) == 1):
		print(j)
		break

	j += 1



Fixed submission:
# -*- coding: utf-8 -*-

N = int(input())
T = [0]*N

for i in range(N):
	T[i] = int(input())


#a, bの最大公約数を求める
def gcd(a, b):
	r = max(a, b) % min(a, b)
	


	if (r == 0):
		return min(a, b)

	else:
		return gcd(r, min(a, b))


#a, bの最小公倍数を求める
def lcm(a, b):
	return a * b // gcd(a, b)



#リストTの全要素の最小公倍数を求める
def LCM(T):
	l = len(T)



	if(l == 1):
		return T[0]

	elif(l == 2):
		return lcm(T[0], T[1])



	T1, T2 = [], []

	for i in range(l // 2):
		T1.append(T[i])

	for j in range(l - l // 2):
		T2.append(T[j + l // 2])



	return lcm(LCM(T1), LCM(T2))



print(LCM(T))
Buggy python submission (verdict: Runtime Error):
K = int(input())

b = int(K % 50)
a = int((K - b) / 50)
	
list = [0] * 50
j = print(' '.join(list))0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j >49 - b and j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1


list = map(str, list)
print('50')


Fixed submission:
K = int(input())

b = K % 50
a = K // 50
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1

list = map(str, list)
print('50')
print(' '.join(list))

Buggy python submission (verdict: Runtime Error):
K = int(input())
a = 0
b = 0

for i in range(1, 51):
	if (K - K % i) / i + i - 1 >= 1000 + 10**16:
		break

	b = int(K % i)
	a = int((K - b) / i)
	N = i
	


list = [0] * N
j = 0


print(a, b, N)


while (j <= N - b - 1) :
	list[j] = N + a - b - 1
	j += 1

while (j > N - b - 1 and j <= N - 1):
	list[j] = 2 * N - b
	j += 1


list = map(str, list)
print(' '.join(list))

Fixed submission:
K = int(input())

b = K % 50
a = K // 50
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1

list = map(str, list)
print('50')
print(' '.join(list))
Buggy python submission (verdict: Runtime Error):
num = input()
num = str(num)
isthere = False
for i in range(0, 2):
	if num[i] == '9':
		isthere = True

if isthere:
	print('Yes')
else:
	print('No')

input()

Fixed submission:
num = input()
num = str(num)
isthere = False
for i in range(0, 2):
	if num[i] == '9':
		isthere = True

if isthere:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
#coding=UTF-8
import math

N=int(input())
ans=1
for idx in range(0,N,1):
    T=int(input())
    ans=ans*T// math.gcd(ans,T)

print(ans)


Fixed submission:
#coding=UTF-8
#import math
import fractions

N=int(input())
ans=1
for idx in range(0,N,1):
    T=int(input())
    ans=ans*T// fractions.gcd(ans,T)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#coding=UTF-8

mozir=input()
hyo=mozir.split(' ')
N=int(hyo[0])
M=int(hyo[1])

a=[]
b=[]
for idx in range(0,M,1):
    mozir=input()
    hyo=mozir.split(' ')
    a.append(int(hyo[0]))
    b.append(int(hyo[1]))

# collect x s.t. exists (1,x)
myon=[]
# and collct y s.t. exists (y,N)
meguru=[]
for idx in range(0,M,1):
    if a[idx]==1:
        myon.append(b[idx])

    if b[idx]==N:
        meguru.append(a[idx])

ans=False
for youmu in myon:
    if youmu in meguru:
        ans=True
        break

prefix='' if ans else 'IM'
print(prefix+'POSSIBLE')


Fixed submission:
#coding=UTF-8

#メモリ大富豪プレイ
mozir=input()
hyo=mozir.split(' ')
N=int(hyo[0])
M=int(hyo[1])

a=[]
b=[]
for idx in range(0,M,1):
    mozir=input()
    hyo=mozir.split(' ')
    a.append(int(hyo[0])-1)
    b.append(int(hyo[1])-1)

# collect x s.t. exists (1,x)
myon_tbl=[False]*N
# and collct y s.t. exists (y,N)
meguru_tbl=[False]*N
for idx in range(0,M,1):
    if a[idx]==0:
        myon_tbl[b[idx]]=True

    if b[idx]==N-1:
        meguru_tbl[a[idx]]=True

ans=False
for idx in range(0,N,1):
    if myon_tbl[idx] and meguru_tbl[idx]:
        ans=True
        break

prefix='' if ans else 'IM'
print(prefix+'POSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
#coding=UTF-8

n=int(input())

mozir=input()
hyo=mozir.split(' ')
#a=[int(mono) for mono in hyo]

tmplst=[]
for idx in range(0,n,1):
    if idx%2==0:
        tmplst.append(hyo[idx])
    else:
        tmplst.insert(0,hyo[idx])


#print(tmplst)
demoji=''
if n%2==0:
    for idx in range(0,n,1):
        demoji=demoji + tmplst[idx]
        if idx != n-1:
            demoji=demoji + ' '
else:
    for idx in range(0,n,1):
        demoji=demoji + tmplst[n-(idx+1)]
        if idx != n-1:
            demoji=demoji + ' '

print(demoji)


Fixed submission:
#coding=UTF-8

n=int(input())

mozir=input()
hyo=mozir.split(' ')
#a=[int(mono) for mono in hyo]


idx=n-1
ans=''
#decending
while idx>=0:
    ans=ans+hyo[idx]
    ans=ans+' '
    idx=idx-2

if idx%2==0:
    idx=1
else:
    idx=0

while idx<n:
    ans=ans+hyo[idx]
    if n-idx <= 2:
        pass
    else:
        ans=ans+' '
    idx=idx+2

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#coding=UTF-8

n=int(input())

mozir=input()
hyo=mozir.split(' ')
a=[int(mono) for mono in hyo]

tmplst=[]
for idx in range(0,n,1):
    if idx%2==0:
        tmplst.append(a[idx])
    else:
        tmplst.insert(0,a[idx])


#print(tmplst)
demoji=''
if n%2==0:
    for idx in range(0,n,1):
        demoji=demoji + str(tmplst[idx])
        if idx != n-1:
            demoji=demoji + ' '
else:
    for idx in range(0,n,1):
        demoji=demoji + str(tmplst[n-(idx+1)])
        if idx != n-1:
            demoji=demoji + ' '

print(demoji)


Fixed submission:
#coding=UTF-8

n=int(input())

mozir=input()
hyo=mozir.split(' ')
#a=[int(mono) for mono in hyo]


idx=n-1
ans=''
#decending
while idx>=0:
    ans=ans+hyo[idx]
    ans=ans+' '
    idx=idx-2

if idx%2==0:
    idx=1
else:
    idx=0

while idx<n:
    ans=ans+hyo[idx]
    if n-idx <= 2:
        pass
    else:
        ans=ans+' '
    idx=idx+2

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#coding=UTF-8

N=int(input())
a=[]

for idx in range(0,N,1):
    a.append(int(input())-1)

visited=[]
lit=0
length=0
ans=None
while ans==None:
    lit=a[lit] #press
    length+=1
    if lit == 2-1:
        ans=True
    elif lit in visited:
        #ethernal loop
        ans=False
        

    visited.append(lit)

if ans:
    print(length)
else:
    print(-1)


Fixed submission:
#coding=UTF-8

N=int(input())
a=[]

for idx in range(0,N,1):
    a.append(int(input())-1)


lit=0
length=0
ans=None
for idx in range(0,N,1):
    lit=a[lit] #press
    length+=1
    if lit == 2-1:
        ans=True
        break
        



if ans:
    print(length)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
inp = input()

in1 = inp // 10
in2 = inp % 10
if in1 == 9 or in2 == 9:
  print('YES')
else:
  print('NO')

Fixed submission:
inp = input()

if '9' in inp:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
inp = input()

inp = str(in)
if '9' in inp:
  print('YES')
else:
  print('NO')

Fixed submission:
inp = input()

if '9' in inp:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
print( ( int(input()) - 1 ) * ( int(input()) - 1) )

Fixed submission:
n, m = map(int, input().split())
print((m - 1) * (n - 1))