Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x=int(input())
if x= 7:
    print('yes')
elif x=5:
    print('yes')
elif x=3:
    print('yes')
else:
    print('no')

Fixed submission:
x=int(input())
if x==7:
    print('YES')
elif x==5:
    print('YES')
elif x==3:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))

for i in H:
    temp = T-i*0.006-A
print(min(temp))

Fixed submission:
N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))
t = [abs(T - H[i]*0.006-A) for i in range(N)]
print(t.index(min(t))+1)
Buggy python submission (verdict: Runtime Error):
N=int(input())
if N==1:
    print('Hello World')
else:
    A,B=map(int,input().split())
    print(A+B)

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

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

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

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

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

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

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

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

Fixed submission:
N=int(input())
if N==1:
    print('Hello World')
else:
    A=int(input())
    B=int(input())
    print(A+B)
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()))
if X<Z<=Y and max(x)<Z and min(y)>=Z :
    print('No War')
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()))
Z=min(y)
if X<Z<=Y and max(x)<Z and min(y)>=Z :
    print('No War')
else:
    print('War')
Buggy python submission (verdict: Runtime Error):
n.i=map(int,input().split())
print(n-i+1)

Fixed submission:
n,i=map(int,input().split())
print(n-i+1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N < 105:
    print(int(0))
elif 105<=N<135:
    print(int(1))
elif 135<=N<165:
    print(int(2))
elif 165<=N<189
    print(int(3))
elif 189<=N<195
    print(int(4))
else:
    print(int(4))

Fixed submission:
N = int(input())
if N < 105:
    print(int(0))
elif 105<=N<135:
    print(int(1))
elif 135<=N<165:
    print(int(2))
elif 165<=N<189:
    print(int(3))
elif 189<=N<195:
    print(int(4))
else:
    print(int(5))
Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
for b in range (1,32):
    for i in range (2,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))

Fixed submission:
a,b,c,d = map(int,input().split())
if abs(c-a)<= d:
    print('Yes')
elif abs(b-a)<=d and abs(c-b)<=d:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
for b in range (2,32):
    for i in range (1,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))

Fixed submission:
x=int(input())
l=[]
for b in range (1,32):
    for i in range (2,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))

Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
for b in range (2,32):
    for i in range (1,10):
        if b**i <=x:
            l.apprnd b**i
print(max(l))


Fixed submission:
x=int(input())
l=[]
for b in range (1,32):
    for i in range (2,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))

Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
for b in range (2,32):
    for i in range (1,10):
        if b**i <=x:
            l.apprnd b**j
print(max(l))

Fixed submission:
x=int(input())
l=[]
for b in range (1,32):
    for i in range (2,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
for i in range(min(a,b), 0, -1):
  if a%i==0 and b%i==0:
    count+=1
  if count==c:
    print(i)
    break
  

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

count = 0
for i in range(min(a,b), 0, -1):
  if a%i==0 and b%i==0:
    count+=1
  if count==c:
    print(i)
    break

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
for i in range(min(a,b), 0, -1):
  if a%i==0 and b%i==0:
    count+=1
  if count==c:
    print(i)
  

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

count = 0
for i in range(min(a,b), 0, -1):
  if a%i==0 and b%i==0:
    count+=1
  if count==c:
    print(i)
    break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int, input().split()))
count = 0
cl = []
sm = 0
for i in range(n):
  sm+=s[i]
  cl.append(sm)

        
m = set(cl)
st = set(cl)
for x in st:
  t = cl.count(x)
  count+=int(t*(t-1)/2)

count+=cl.count(0)
print(count)

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
count = 0
dic = {}
cl = []
sm = 0
for i in range(n):
  sm+=s[i]
  if sm not in dic.keys():
    dic.update({sm:1})
  else:
    dic[sm]+=1

        
for x in dic.keys():
  t = dic[x]
  if x==0:
    count+=dic[x]
  count+=int(t*(t-1)/2)

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int, input().split()))
count = 0
cl = []
sm = 0
for i in range(n):
  sm+=s[i]
  cl.append(sm)

for i in range(n):
  for j in range(i, n):
    if i==0:
      if cl[j]==0:
        count+=1
    else:
      if cl[j]-cl[i-1]==0:
        count+=1
        
print(count)

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
count = 0
dic = {}
cl = []
sm = 0
for i in range(n):
  sm+=s[i]
  if sm not in dic.keys():
    dic.update({sm:1})
  else:
    dic[sm]+=1

        
for x in dic.keys():
  t = dic[x]
  if x==0:
    count+=dic[x]
  count+=int(t*(t-1)/2)

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int, input().split()))
count = 0
for i in range(n):
  for j in range(i, n):
    if sum(s[i:j+1])==0:
      count+=1

print(count)

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
count = 0
dic = {}
cl = []
sm = 0
for i in range(n):
  sm+=s[i]
  if sm not in dic.keys():
    dic.update({sm:1})
  else:
    dic[sm]+=1

        
for x in dic.keys():
  t = dic[x]
  if x==0:
    count+=dic[x]
  count+=int(t*(t-1)/2)

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
S = list(map(int, list(input())))
before = len(S)

if 0 not in S:
    print(0)
elif 1 not in S:
    print(0)

else:
    while True:
        if 0 not in S:
            after = len(S)
            break
        elif 1 not in S:
            after = len(S)
            break
        
        for i in range(before - 2):
            if S[i] == 1 and S[i + 1] == 0:
                S.pop(i)
                S.pop(i)
                break
            elif S[i] == 0 and S[i + 1] == 1:
                S.pop(i)
                S.pop(i)
                break
    print(before - after)

Fixed submission:
S = list(map(int, list(input())))

if 0 not in S:
    print(0)

elif 1 not in S:
    print(0)

else:
    zeros = S.count(0)
    ones = S.count(1)
    if zeros > ones:
        print(ones * 2)
    else:
        print(zeros * 2)
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
A = list(map(int,input().split()))

gcd = A[0]
for i in range(1, n):
    gcd = math.gcd(gcd, A[i])

print(gcd)

Fixed submission:
def gcd(a, b):
    if a < b:
        a, b = b, a
    
    c = a % b
    if c == 0:
        return b
    else:
        return gcd(b, c)

n = int(input())
A = list(map(int,input().split()))

g = A[0]
for i in range(1, n):
    g = gcd(g, A[i])

print(g)
Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())
ans=[]
for i in range(1,min(A,B)):
  if A%i==0 and B%i==0:
    ans.append(i)
print(ans[-K])

Fixed submission:
A,B,K=map(int,input().split())
ans=[]
for i in range(1,min(A,B)+1):
  if A%i==0 and B%i==0:
    ans.append(i)
print(ans[-K])
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
count =0

while True:
    if '01' not in S and '10' not in S:
        break
    if '01' in S:
        a = S.count('01')
        S = S.replace('01','',a)
        count += a
        #print(S)
    if '10' in S:
        b = S.count('10')
        S = S.replace('10','',b)
        count += b
        #print(S)

#print(S)
print(count*2)

Fixed submission:
S = input()

a = S.count('0')
b = S.count('1')

print(a+b-abs(a-b))

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
count =0

while True:
    if '01' not in S and '10' not in S:
        break
    if '01' in S:
        S = S.replace('01','',1)
        count += 1
        #print(S)
    if '10' in S:
        S = S.replace('10','',1)
        count += 1
        #print(S)

#print(S)
print(count*2)

Fixed submission:
S = input()

a = S.count('0')
b = S.count('1')

print(a+b-abs(a-b))
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)


N = int(input())

A = list(map(int,input().split()))

print(gcd(A))


Fixed submission:
N = int(input())

A = list(map(int,input().split()))

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
        
a = A[0]
for i in range(N):
    a = gcd(a,A[i])

print(a)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)


N = int(input())

A = list(map(int,input().split()))

print(gcd(A))

Fixed submission:
N = int(input())

A = list(map(int,input().split()))

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
        
a = A[0]
for i in range(N):
    a = gcd(a,A[i])

print(a)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)


N = int(input())

A = list(map(int,input().split()))

print(gcd(A))



Fixed submission:
N = int(input())

A = list(map(int,input().split()))

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
        
a = A[0]
for i in range(N):
    a = gcd(a,A[i])

print(a)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)


N = int(input())

A = list(map(int,input().split()))

print(gcd(A))


Fixed submission:
N = int(input())

A = list(map(int,input().split()))

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
        
a = A[0]
for i in range(N):
    a = gcd(a,A[i])

print(a)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)


N = int(input())

A = list(map(int,input().split()))

print(gcd(A))


Fixed submission:
N = int(input())

A = list(map(int,input().split()))

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
        
a = A[0]
for i in range(N):
    a = gcd(a,A[i])

print(a)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())

A = list(map(int,input().split()))

B = [0]*41

for i in range(N):
    for j in range(41):
        if (A[i]>>j) & 1 == 1:
            B[j] += 1
    #print(B)

C = []
for i in range(K+1):
    X = 0
    for j in range(41):
        if (i>>j) & 1 == 1:
            X += (N-B[j])*2**j
        elif (i>>j) & 1 == 0 and B[j] != 0:
            X += B[j]*2**j
    C.append(X)
            

print(max(C))
    

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

A = list(map(int,input().split()))

B = [0]*41

for i in range(N):
    for j in range(41):
        if (A[i]>>j) & 1 == 1:
            B[j] += 1
#print(B)

C = [0]*41
for i in range(41):
    if (K>>i) & 1 == 1:
        C[i] += 1
#print(C)
D =[]
for i in range(40,-1,-1):
    count = 0
    if C[i] == 1:
        count += B[i]*2**i
        for k in range(40,i,-1):
            if C[k] == 0:
                count += B[k]*2**k
            else:
                count += (N-B[k])*2**k
        for j in range(i):
            if N-B[j] >= B[j]:
                count += (N-B[j])*2**j
            else:
                count += B[j]*2**j
    D.append(count)
score = 0
for i in range(41):
    if C[i] == 0:
        score += B[i]*2**i
    else:
        score += (N-B[i])*2**i
D.append(score)
#print(D)
print(max(D))

Buggy python submission (verdict: Time Limit Exceeded):
N, K=map(int,input().split())

A = list(map(int, input().split()))

F = []
for i in range(K+1):
    count = 0
    for j in range(N):
        count += i^A[j]
    F.append(count)
print(max(F))

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

A = list(map(int,input().split()))

B = [0]*41

for i in range(N):
    for j in range(41):
        if (A[i]>>j) & 1 == 1:
            B[j] += 1
#print(B)

C = [0]*41
for i in range(41):
    if (K>>i) & 1 == 1:
        C[i] += 1
#print(C)
D =[]
for i in range(40,-1,-1):
    count = 0
    if C[i] == 1:
        count += B[i]*2**i
        for k in range(40,i,-1):
            if C[k] == 0:
                count += B[k]*2**k
            else:
                count += (N-B[k])*2**k
        for j in range(i):
            if N-B[j] >= B[j]:
                count += (N-B[j])*2**j
            else:
                count += B[j]*2**j
    D.append(count)
score = 0
for i in range(41):
    if C[i] == 0:
        score += B[i]*2**i
    else:
        score += (N-B[i])*2**i
D.append(score)
#print(D)
print(max(D))
Buggy python submission (verdict: Runtime Error):
Score_Alice, Score_Bob = map(int, input().split())

if Score_Alice == 1 and Score_Bob == 1:
  print('Draw')
elif Score_Alice == 1 and Score_Bob != 1:
  print('Alice')
elif Score_Alice != 1 and Score_Bob == 1:
  print('Bob')
else:
  if Score_Alice > Score_Bob:
    print('Alice')
  elif Score_Alice < Scoer_Bob:
    print('Bob')
  else:
    print('Draw')

Fixed submission:
Score_Alice, Score_Bob = map(int, input().split())

if Score_Alice == 1 and Score_Bob == 1:
  print('Draw')
elif Score_Alice == 1 and Score_Bob != 1:
  print('Alice')
elif Score_Alice != 1 and Score_Bob == 1:
  print('Bob')
else:
  if Score_Alice > Score_Bob:
    print('Alice')
  elif Score_Alice < Score_Bob:
    print('Bob')
  else:
    print('Draw')

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

if Score_Alice == 1 and Score_Bob == 1:
  print('Draw')
elif Score_Alice == 1 and Score_Bob != 1:
  print('Alice')
elif Score_Alice != 1 and Score_Bob == 1:
  print('Bob')
else:
  if Score_Alice > Score_Bob:
    print('Alice')
  elif Score_Alice < Scoer_Bob:
    print('Bob')
  else:
    print('Draw')

Fixed submission:
Score_Alice, Score_Bob = map(int, input().split())

if Score_Alice == 1 and Score_Bob == 1:
  print('Draw')
elif Score_Alice == 1 and Score_Bob != 1:
  print('Alice')
elif Score_Alice != 1 and Score_Bob == 1:
  print('Bob')
else:
  if Score_Alice > Score_Bob:
    print('Alice')
  elif Score_Alice < Score_Bob:
    print('Bob')
  else:
    print('Draw')
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int,input().split())

count = 0

for x in range(K+1):
    for y in range(K+1):
        for z in range(K+1):
            if x+y+z == S:
                count += 1
            
print(count)    

Fixed submission:
K, S = map(int,input().split())

count = 0

for x in range(K+1):
    for y in range(K+1):
        if 0 <= S-x-y <= K:
            count += 1
            
print(count)
Buggy python submission (verdict: Runtime Error):
str = input()
p = 0
count = 0
while(True):
	if p >= len(str) - 1:
		break
	if str[p] != str[p+1]:
		newstr = str[0:p] + str[p+2:]
		p -= 1
		count += 2
		str = newstr
	else:
		p += 1
print(count)
	

Fixed submission:
str = input()
num0,num1 = 0,0
for i in range(len(str)):
	if str[i] == '0':
		num0 += 1
	elif str[i] == '1':
		num1 += 1
if num1 >= num0:
	count = num0*2
	print(count)
else:
	count = num1*2
	print(count)
Buggy python submission (verdict: Runtime Error):
A,B,C = [int(_) for _ in input().split]
n = min(B//A,C)
print(n)

Fixed submission:
A,B,C = [int(_) for _ in input().split()]
n = min(B//A,C)
print(n)
Buggy python submission (verdict: Runtime Error):
A,B,K = [int(_) for _ in input().split]
M = A*B
print(M * K)

Fixed submission:
A,B,K = [int(_) for _ in input().split()]
c = 0
i = 100
while True:
    if A%i == B%i == 0:
        c += 1
    if c == K:
        break
    i -= 1
print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(_) for _ in input().split()]
m = min(A)
if m == 1:
    print(m)
else:
    while m > 0:
        m = min(A)
        for i in range(0,len(A)):
            if A[i] != m:
                A[i] = A[i]%m
        z = A.count(0)
        for j in range(z):
            A.remove(0)
        if A.count(1) >= 1:
            m = 1
            break
        else:
            if [_%min(A) for _ in A].count(0) == len(A):
                m = min(A)
                break
    print(m)

Fixed submission:
N = int(input())
A = [int(_) for _ in input().split()]
m = min(A)
while m > 0:
    for i in range(0,len(A)):
        if A[i] != m:
            A[i] = A[i]%m
    z = A.count(0)
    A = sorted(A)[z:]
    m = A[0]
    if m == 1:
        break
    else:
        if [_%m for _ in A] == [0]*len(A):
            break
print(m)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

s = str(input())

x = int(0)
i = int(len(s))

while "01" in s:
    s=s.replace("01","")
    s=s.replace("10","")
    x = x + i- int(len(s))
    i = int(len(s))

while "10" in s:
    s=s.replace("10","")
    x = x + i- int(len(s))
    i = int(len(s))

print(x)

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

s = str(input())

x = int(0)
i = int(len(s))

s0 = int(len(s.replace("1","")))
s1 = i-s0

print(int(2*min(s0,s1)))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

s = str(input())

x = int(0)
i = int(len(s))

while "01" in s:
    s=s.replace("01","")
    x = x + i- int(len(s))
    i = int(len(s))

while "10" in s:
    s=s.replace("10","")
    x = x + i- int(len(s))
    i = int(len(s))

print(x)

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

s = str(input())

x = int(0)
i = int(len(s))

s0 = int(len(s.replace("1","")))
s1 = i-s0

print(int(2*min(s0,s1)))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
tmp=input()
n = int(tmp.split(" ")[0])
k = int(tmp.split(" ")[1])

h=[]

for i in range(n):
    h.append(int(input()))

h.sort()

x=int(0)
y=int(h[k-1]-h[0])

for i in range(k):
    x=h[i+k-1]-h[i]
    if x < y:
        y=x


print(y)


Fixed submission:
# -*- coding: utf-8 -*-
 
tmp=input()
n = int(tmp.split(" ")[0])
k = int(tmp.split(" ")[1])
 
h=[]
 
for i in range(n):
    h.append(int(input()))
 
h.sort()
 
x=int(0)
y=int(h[k-1]-h[0])
 
for i in range(n-k+1):
    x=h[i+k-1]-h[i]
    if x < y:
        y=x
 
print(y)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import fractions
 
N,X = map(int, input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
y=[]
 
i=0
while i < n:
    y.append(x[i+1]-x[i])
    i +=1
y.sort()
 
y=list(set(y))
m=len(y)
z=y[0]
i=0
while i < m:
    z=fractions.gcd(z,y[i])
    i+=1
 
print(z)

Fixed submission:
# -*- coding: utf-8 -*-
 
tmp = input()
a=[int(x) for x in tmp.split()]

if a[0]*a[1] % 2 == 1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
import re
n = -1
r = s
while n != 0:
    r,n = re.subn("(01|10)", "", r)
print(len(s)-len(r))



Fixed submission:
"""
0011 = 4
0101 = 4
00111 = 4
01011 = 4
10011 = 4
000111 = 6
001011 = 6

0または1のいずれか個数の少ない文字を特定する
特定した文字の個数を2倍する
"""

s = input()
n = min(s.count("0"), s.count("1"))
r = n*2
print(r)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()[::-1]
c = 0
while S.find("WB") != -1:
    S = S.replace("WB", "BW", 1)
    c += 1
print(c)


Fixed submission:
S = input()
S = S[::-1]
y = -1

def x():
    global y
    y += 1
    return y

c = [i-x() for i in range(len(S)) if S[i]=="B"]
print(sum(c))
Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
T = list(input())
r = "Yes"
for i in range(len(S)):
    s1 = S[i]
    t1 = T[i]
    s_bit = list(map(lambda x:1 if x==s1 else 0, S))
    t_bit = list(map(lambda x:1 if x==t1 else 0, T))
    if s_bit != t_bit:
        r = "No"
        break
print(r)

Fixed submission:
import numpy as np
S = list(input())
T = list(input())
r = "Yes"
end_list = np.array([0] * len(S))
for i in range(len(S)):
    if end_list[i] == 0:
        s1 = S[i]
        t1 = T[i]
        s_bit = list(map(lambda x:1 if x==s1 else 0, S))
        t_bit = list(map(lambda x:1 if x==t1 else 0, T))
        if s_bit != t_bit:
            r = "No"
            break
        end_list += np.array(s_bit)
print(r)
Buggy python submission (verdict: Runtime Error):
count, init = tuple(map(int, input().split(" ")))
Xs = [init] + list(map(int, input().split(" ")))
l = [abs(Xs[i]-Xs[i+1]) for i in range(count)]
for i in range(2, min(l)+1)[::-1]:
    if max(map(lambda x: x%i, l)) == 0:
        print(i)
        exit(0)
print(1)

Fixed submission:
args = input().split()
if ( int(args[0]) * int(args[1]) ) % 2 == 0:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
args = input().split(" ")
if args[0]*args[1]%2 == 0:
  print("No")
else:
  print("Yes")

Fixed submission:
args = input().split()
if ( int(args[0]) * int(args[1]) ) % 2 == 0:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
from functools import *
N, X = list(map(int, input().split(" ")))
xs = list(map(int, input().split(" ")))
xs = list(map(lambda x: X-x if X>x else x-X, xs))
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b) 
r = reduce(gcd, d)
print(r)


Fixed submission:
from functools import reduce
import numpy as np

def gcd(a, b):
    if b > 0:
        return gcd(b, a%b)
    else:
        return a

def gcd_list(arg_list):
    return reduce(gcd, arg_list)

N, X = tuple(map(int, input().split(" ")))
Xs = [X] + list(map(int, input().split(" ")))
Xs = map(abs, np.diff(Xs))
r = gcd_list(Xs)
print(r)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
def gcd(arg_list):
    return reduce(math.gcd, arg_list)

N, X = tuple(map(int, input().split(" ")))
Xs = list(map(int, input().split(" ")))
r = gcd(Xs)
print(r)


Fixed submission:
from functools import reduce
import numpy as np

def gcd(a, b):
    if b > 0:
        return gcd(b, a%b)
    else:
        return a

def gcd_list(arg_list):
    return reduce(gcd, arg_list)

N, X = tuple(map(int, input().split(" ")))
Xs = [X] + list(map(int, input().split(" ")))
Xs = map(abs, np.diff(Xs))
r = gcd_list(Xs)
print(r)

Buggy python submission (verdict: Time Limit Exceeded):
count, init = tuple(map(int, input().split(" ")))
Xs = [init] + list(map(int, input().split(" ")))
l = [abs(Xs[i]-Xs[i+1]) for i in range(count)]
for i in range(2, min(l)+1)[::-1]:
    if max(map(lambda x: x%i, l)) == 0:
        print(i)
        exit(0)
print(1)

Fixed submission:
from functools import reduce
import numpy as np

def gcd(a, b):
    if b > 0:
        return gcd(b, a%b)
    else:
        return a

def gcd_list(arg_list):
    return reduce(gcd, arg_list)

N, X = tuple(map(int, input().split(" ")))
Xs = [X] + list(map(int, input().split(" ")))
Xs = map(abs, np.diff(Xs))
r = gcd_list(Xs)
print(r)