Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=list(input())
u=[int(s[0]+s[1]),int(s[2]+s[3])]
if(u[0]<=12):
    m1=1
    if(u[1]<=12):
        m2=1
    else:
        m2=0
else:
    m1=0
    if(u[1]<=12):                                                                                                                           m2=1                                                                                                                            else:
        m2=0
if(m1==1 and m2==0):
    print('MMYY')                                                                                                                   elif(m1==1 and m2==1):
    print('AMBIGUOUS')
elif(m1==0 and m2==0):
    print('NA')
else:
    print('YYMM')

Fixed submission:
s=list(input())
u=[int(s[0]+s[1]),int(s[2]+s[3])]
if(0<u[0]<=12):
    m1=1
    if(0<u[1]<=12):                                                                                                                                                                                                    m2=1
    else:
        m2=0
else:
    m1=0
    if(0<u[1]<=12):
        m2=1
    else:
        m2=0
if(m1==1 and m2==0):
    print('MMYY')
elif(m1==1 and m2==1):
    print('AMBIGUOUS')
elif(m1==0 and m2==0):
    print('NA')
else:
    print('YYMM')
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
b=[]
ans=0
for _ in range(n):
    c,d=map(int,input().split())
    a.append(c)
    b.append(d)
e=sorted(a)
for i in range(n):
    m=m-b[a.index(e[i])]
    if(m=<0):
        ans+=e[i]*(b[a.index(e[i])]+m)
        break
    else:
        ans+=b[a.index(e[i])]*e[i]
print(ans)

Fixed submission:
n,m=map(int,input().split())
a=[]
ans=0
for i in range(n):
    a.append(list(map(int,input().split())))
a=sorted(a)
for i in range(n):
    m=m-a[i][1]
    if(m<=0):
        ans+=a[i][0]*(a[i][1]+m)
        break
    else:
        ans+=a[i][1]*a[i][0]
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))
i=0
while(a[1] != 0):
    a[i+1]=a[i+1]-(a[i+1]//a[i])*a[i]
    a=sorted(a)
    if(a[0] == 0):
        i += 1
        while(a[1] != 0):
            a[i+1]=a[i+1]-(a[i+1]//a[i])*a[i]
            a=sorted(a)
print(a[i+1])

Fixed submission:
a,b=map(int,input().split())
if(b%a==0):
    print(a+b)
else:
    print(b-a)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))
i=0
while(a[-2] != 0):
    if(a[-1]%a[i]==0):
        a[-1]=0
        i+=1
    else:
        a[-1]=a[-1]-(a[-1]//a[i])*a[i]
    a=sorted(a)
print(a[-1])

Fixed submission:
a,b=map(int,input().split())
if(b%a==0):
    print(a+b)
else:
    print(b-a)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
lovelist=[]
for _ in range(n):
    a=set(sorted(list(map(int,input().split()))))
    lovelist.append(a)
for i in range(n-1):
    lovelist[i+1]=lovelist[i]&lovelist[i+1]
print(len(lovelist[2]))

Fixed submission:
n,m=map(int,input().split())
l=[]
for _ in range(n):
    a=list(map(int,input().split()))
    a=set(a[1:])
    l.append(a)
for i in range(n-1):
    l[i+1]=l[i]&l[i+1]
print(len(l[-1]))
Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
t=len(s)-1
count = 0
for i in range(t):
    for j in range(t):
        if(s[j]=='B'):
            if(s[j + 1]=='W'):
                s[j]="W"
                s[j+1]="B"
                count += 1
print(count)

Fixed submission:
s = list(input())
t=len(s)
count = 0
a = 0
for j in range(t):
    if(s[j]=='W'):
        count += j-a
        a += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
count = 0
for i in range(len(s)):
    for j in range(len(s)-1):
        if(s[j]=='B'):
            if(s[j + 1]=='W'):
                s[j]="W"
                s[j+1]="B"
                count += 1
            else:
                continue
        else:
            continue
print(count)

Fixed submission:
s = list(input())
t=len(s)
count = 0
a = 0
for j in range(t):
    if(s[j]=='W'):
        count += j-a
        a += 1
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)

Fixed submission:
x, y = map( int, input().split())
print( int( x + y/ 2))

Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])

Fixed submission:
x, y = map( int, input().split())
print( int( x + y/ 2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)


Fixed submission:
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input().split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A  map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]

for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T + 1)

Fixed submission:
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input().split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)
Buggy python submission (verdict: Runtime Error):
N = int(input())

if( N == 1):
  print('Hello World')
  
if( N == 2):
  A = int(input())
  B = int(input())
  
 print(int( A + B))

Fixed submission:
N = int(input())

if( N == 1):
  print('Hello World')
  
if( N ==2):
  A = int( input())
  B = int( input())
  print( int( A + B))

Buggy python submission (verdict: Runtime Error):
N = int(input())
if(int(N == 1)):
  print('Hello World')
 
if(int(N == 2)):
  A, B = map( int, input().split())
  print( int(A + B))

Fixed submission:
N = int(input())

if( N == 1):
  print('Hello World')
  
if( N ==2):
  A = int( input())
  B = int( input())
  print( int( A + B))
Buggy python submission (verdict: Runtime Error):
N = int( input())

n = N // 100

if( N % 100 <= n * 10 + n):
	print(n * 100 + n * 10 + n )
  
else:


Fixed submission:
n = list(map( int, input()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)

Buggy python submission (verdict: Runtime Error):
n = list(map( int, sinput()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)

Fixed submission:
n = list(map( int, input()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)

Buggy python submission (verdict: Runtime Error):
n = list(map( int, split()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)

Fixed submission:
n = list(map( int, input()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)

Buggy python submission (verdict: Runtime Error):
n = list(map( int, split()))

h = 3
for i range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)

print(a)

Fixed submission:
n = list(map( int, input()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)
Buggy python submission (verdict: Runtime Error):
N, M, X, Y =map( int, input().split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
print('War')

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

N = sorted(N)

Nmax = int( N[2] * 10 + N[1] + N[0])

print(int(Nmax))

Buggy python submission (verdict: Runtime Error):
N, M, X, Y =map( int, input()split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
  else:
    print('War')
    break

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

N = sorted(N)

Nmax = int( N[2] * 10 + N[1] + N[0])

print(int(Nmax))

Buggy python submission (verdict: Runtime Error):
N = list(map( int, input().splot()))

N = sorted(N)

Nmax = int(N[2] * 10 + N[1] + N[0])

print(int(Nmax))

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

N = sorted(N)

Nmax = int( N[2] * 10 + N[1] + N[0])

print(int(Nmax))
Buggy python submission (verdict: Runtime Error):
N, M, X, Y =map( int, input()split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
  else:
    print('War')

Fixed submission:
N, M, X, Y =map( int, input().split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
print('War')

Buggy python submission (verdict: Runtime Error):
N, M, X, Y =map( int, input()split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))

x = sorted(x)
y = sorted(y)

for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
  else:
    print('war')
    break

Fixed submission:
N, M, X, Y =map( int, input().split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
print('War')
Buggy python submission (verdict: Runtime Error):
N = int(input())

W = []

W.append(input())

for n in range(N):
    w = input()

    if( w[0] == W[n][-1] and w not in W):
        W.append(w)
        continue

    else:
        print('No')
        exit()

print('Yes')

Fixed submission:
A, B = map( int, input().split())
 
D = A * B
 
if( D % 2 == 1):
  print('Yes')
  
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
A, B = map( int, input()split())

D = A * B

if( D % 2 == 1):
  print('Yes')
  
else:
  print('No')

Fixed submission:
A, B = map( int, input().split())
 
D = A * B
 
if( D % 2 == 1):
  print('Yes')
  
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())

W = []

W.append(input())

for n in range(N):
    w = input()

    if( w[0] == W[n][-1] and w not in W):
        W.append(w)
        continue

    else:
        print('No')
        exit()

print('Yes')

Fixed submission:
N = int(input())

W = []

W.append(input())

for n in range(N-1):
    w = input()

    if( w[0] == W[n][-1] and w not in W):
        W.append(w)
        continue

    else:
        print('No')
        exit()

print('Yes')
Buggy python submission (verdict: Runtime Error):
H, W = map( int, input().split())

a = []
b = []
c = []

for i in range(H):
  a1 = input()
  if('#' in a1):
     a.append(a1)
        
  else:
      continue

a = list(zip(*a))
l1 = len(a)
         
for j in range(l1):
  b1 = a[j]
   
  if( '#' in b1):
      b.append(b1)
  
  else:
      continue
         
c = list(zip(*b))
l2 = len(c)

for n in range(l2):
         print("".join(c[n]))

Fixed submission:
N, i = map( int, input().split())

print(N - i + 1)
Buggy python submission (verdict: Runtime Error):
N = int(input())

t = N //2 
intger = []

for n in range(t):
  intg = N / 2
  intger.append(intg)
  N = intg
  
intgersorted = sorted(intger)

print(intger[0])

Fixed submission:
N = int(input())

if( N % 2 == 1):
  print( N * 2)
  
else:
  print(N)
Buggy python submission (verdict: Runtime Error):
T = 0

l = 4

for i in range(l):
  c = input()
  if( c == '+'):
    T += 1
    
  else:
    t -= 1
    
print(T)



Fixed submission:
c = list(input())
T = 0
l = 4

for i in range(l):
  if( c[i] == '+'):
    T += 1
    
  else:
    T -= 1
    
print(T)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nn=n
l=len(str(n))
k=0
for i in range(n):
    k+=n%10
    n=n//10
print(['No','Yes'][nn%k==0])

Fixed submission:
n=int(input())
nn=n
l=len(str(n))
k=0
for i in range(n):
    k+=n%10
    n=n//10
    if(n == 0):
        break
print(['No','Yes'][nn%k==0])
Buggy python submission (verdict: Runtime Error):
A, B = map( int, input().split())

if( abs(A - B) == 1):
  print('yey!)
        
else:
  print(':(')

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

if( A <= 8 and B <= 8):
  print('Yay!')
  
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
l=[]
k=0
c=0
for i in range(999):
    k+=i
    l.append(k)

for j in range(999):
   c=a+j
   if(c in l):
       d=l.index(c)
       if(l[d+1]-j==b):
           print(j)
       else:
           continue
   else:
       continue

Fixed submission:
a,b=map(int,input().split())
l=[]
e=b-a
k=0
for i in range(1000):
    k+=i
    l.append(k)

for j in range(999):
   o=l[j+1]-l[j]
   if(o==e):
       print(l[j]-a)
   else:
       continue
Buggy python submission (verdict: Runtime Error):
N = int( input())
S = list( input())

intger2 = 0

for i in range(N):
  intger1 = 0
  str1 = list(set(S[i + 1:]))
  str2 = list(set(S[:i + 1]))
  l = len(str2)
  
  for j in range(l):
    if( str2[j] in str1):
      intger1 += 1
      
    else:
      continue
  
  if( intger2 <= intger1):
    intger2 = intger1
    
  else:
    continue
    
print(intger2)

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

C1 = A + B
C.append(C1)

C2 = A - B
C.append(C2)

C3 = A * B
C.append(C3)

C = sorted(C)

print(C[2])

Buggy python submission (verdict: Runtime Error):
A, B = map( int, input().split())
C = []

C1 = A + B
C.append(C1)

C2 = A - B
C.append(C2)

C3 = A * B
C.apend(C3)

C = sorted(C)

print(C[2])



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

C1 = A + B
C.append(C1)

C2 = A - B
C.append(C2)

C3 = A * B
C.append(C3)

C = sorted(C)

print(C[2])

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

C1 = A + B
C2 = A - B
C3 = A * B

C = [ C1, C2, C3 ]

C = sorted.C

print(C[2])



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

C1 = A + B
C.append(C1)

C2 = A - B
C.append(C2)

C3 = A * B
C.append(C3)

C = sorted(C)

print(C[2])
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if( A < B):
  if(C < D):
    print(A + C)
    
  else:
    print(A + D)
    
else:
  if(C < D)
    print(B + C)
  
  else:
    print(B + D)


Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if( A < B):
  if(C < D):
    print(A + C)
    
  else:
    print(A + D)
    
else:
  if(C < D):
    print(B + C)
  
  else:
    print(B + D)
Buggy python submission (verdict: Runtime Error):
N = int( input())
s = [ input() for i in range(N)]
M = int(input())
t = [ input() for j in rangwe(M)]

judge = 0
for l in range(N):
  money = s.count(s[l]) - t.count(s[l])
  
  if( judge < money):
    judge = money
  
  else:
    continue
    
print(judge)

Fixed submission:
N = int( input())
s = list()

for i in range(N):
  S = input()
  s.append(S)
  
M = int( input())
t = list()

for j in range(M):
  T = input()
  t.append(T)

  judge = 0
for l in range(N):
  money = s.count(s[l]) - t.count(s[l])
  
  if( judge < money):
    judge = money
  else:
    continue
    
print(judge)
Buggy python submission (verdict: Runtime Error):
C1 = list(input())
C2 = list(input())
C3 = list(imput())

print(C1[0]+C2[1]+C3[2])

Fixed submission:
C1 = list(input())
C2 = list(input())
C3 = list(input())

print(C1[0]+C2[1]+C3[2])
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
a.reverse()
Alice_Bob = o
Bob = 1

for i in a:
	Alice_Bob += a * Bob  
	Bob *= -1
    
print(Alice_Bob)


Fixed submission:
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
a.reverse()
Alice = 0
Bob = 0
a.append(0)
a.append(0)

for i in range(N//2 + 1):
	Alice += int(a[2 * i])  
	Bob += int(a[2 * i + 1])
    
print(Alice -Bob)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
Alice = 0
Bob = 0
a.append(0)

for i in range(N//2 + 1):
	Alice += int(a[2 * i])  
	Bob += int(a[2 * i + 1])
    
print(Alice -Bob)

Fixed submission:
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
a.reverse()
Alice = 0
Bob = 0
a.append(0)
a.append(0)

for i in range(N//2 + 1):
	Alice += int(a[2 * i])  
	Bob += int(a[2 * i + 1])
    
print(Alice -Bob)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
Alice = 0
Bob = 0

for i in range(N):
	Alice += int(a[2*i])  
	Bob += int(a[2*i + 1])
    
print(Alice -Bob)

Fixed submission:
N = int(input())
a = list( map( int, input().split()))
a = sorted(a)
a.reverse()
Alice = 0
Bob = 0
a.append(0)
a.append(0)

for i in range(N//2 + 1):
	Alice += int(a[2 * i])  
	Bob += int(a[2 * i + 1])
    
print(Alice -Bob)
Buggy python submission (verdict: Runtime Error):
a, b = map( int, input().split())
  print(['Even','Odd'][a * b % 2 == 1])

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

d = a * b

if( d % 2 == 0):
  print('Even')
  
else:
  print('Odd')

Buggy python submission (verdict: Runtime Error):
a, b = map( int, input().split())
  print(['Even','Odd'][a * b % 2])

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

d = a * b

if( d % 2 == 0):
  print('Even')
  
else:
  print('Odd')
Buggy python submission (verdict: Runtime Error):
S = list( map( int, input.split()))

S[3] += 1

print(S)

Fixed submission:
S = input()

S = S.replace('2017', '2018')

print(S)
Buggy python submission (verdict: Runtime Error):
print(24 - int(input())

Fixed submission:
M = int(input())
print(48 - M)
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
print([Balanced,Left,Right][(C+D<A+B)-(C+D>A+B)])


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

if( L < R):
  print('Right')
  
elif(L == R):
  print('Balanced')
  
else:
  print('Left')

Buggy python submission (verdict: Runtime Error):
A, B, C, D = map( int, input().split())
L = A + B
R = C + D
print(["Balance","Left","Right"][R<L - R>L]


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

if( L < R):
  print('Right')
  
elif(L == R):
  print('Balanced')
  
else:
  print('Left')

Buggy python submission (verdict: Runtime Error):
A, B, C, D = map( int, input()split())
L = A + B
R = C + D

if( L < R):
  print('Right')
  
else:
  print('Left')

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

if( L < R):
  print('Right')
  
elif(L == R):
  print('Balanced')
  
else:
  print('Left')
Buggy python submission (verdict: Runtime Error):
a, b = map( int, input().split())
print(math.ceil((a + b)/2))


Fixed submission:
import math
a, b = map( int, input().split())
print(math.ceil((a + b)/2))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(n):
    a[j]=a[j]/2
  count=count+1
  
print(count)


Fixed submission:
S = list(input())
print(S.count('1'))

Buggy python submission (verdict: Runtime Error):
S = list(input())
print(s.count('1'))

Fixed submission:
S = list(input())
print(S.count('1'))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
    a[j]=a[j]/2
  count=count+1
  
print(count)


Fixed submission:
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(n):
    a[j]=a[j]/2
  count=count+1
  
print(count)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(N):
    A[j]=A[j]/2
  count=count+1
  
print(count)


Fixed submission:
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(n):
    a[j]=a[j]/2
  count=count+1
  
print(count)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return 1
  return 0:
while h(a) == 0:
  for j in range(N):
    A[j]=A[j]/2
  count=count+1
  
print(count)

Fixed submission:
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(n):
    a[j]=a[j]/2
  count=count+1
  
print(count)
Buggy python submission (verdict: Runtime Error):
n = print(int(int(input())**0.5)**2)

Fixed submission:
C1 = list(input())
C2 = list(input())

for i in range(3):
    if(C1[i] == C2[2-i]):
        continue

    else:
        print('NO')
        exit()

print('YES')
Buggy python submission (verdict: Runtime Error):
X, t = map(int, input().split())
print(x-t)

Fixed submission:
X, t = map(int, input().split())
D = X -t
if(D>0):
    print(D)

else:
    print('0')
Buggy python submission (verdict: Runtime Error):
print(min(set(map(chr,range(97,123)))-set(input())) or["None"])

Fixed submission:
s = input()
check = 'abcdefghijklmnopqrstuvwxyz'

s = set(s)
check = set(check)
s = check - s
s = sorted(s)
if(s):
    print(s[0])
else:
    print('None')
Buggy python submission (verdict: Runtime Error):
n, m = map(int(input().split())
print((n-1)*(m-1))

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

Buggy python submission (verdict: Runtime Error):
n, m = int(input())
print((n-1)*(m-1))

Fixed submission:
n, m = map(int, input().split())
print((n-1)*(m-1))
Buggy python submission (verdict: Runtime Error):
a=[input() for _ in range(int(input()))]
ans=1
c=a[0]
if(c==2):
    print(ans)
else:
    while(c!=2):
        ans+=1
        c=a[c-1]
        if(ans>len(a)):
            print(-1)
            exit()
    print(ans)

Fixed submission:
n=int(input())
a=[]
ans=1
for i in range(n):
    b=int(input())
    a.append(b)
c=a[0]
if(c==2):
    print(ans)
else:
    while(c!=2):
        ans+=1
        c=a[c-1]
        if(ans>len(a)):
            print(-1)
            exit()
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
e=[]
ans=1
for i in range(n):
    b=int(input())
    a.append(b)
c=a[0]
if(c==2):
    print(ans)
else:
    while(c!=2):
        ans+=1
        e.append(c)
        c=a[c-1]
        if(c in e):
            print(-1)
            exit()
    print(ans)

Fixed submission:
n=int(input())
a=[]
ans=1
for i in range(n):
    b=int(input())
    a.append(b)
c=a[0]
if(c==2):
    print(ans)
else:
    while(c!=2):
        ans+=1
        c=a[c-1]
        if(ans>len(a)):
            print(-1)
            exit()
    print(ans)