Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

def gcd(a,b):
  aa=max(a,b)
  bb=min(a,b)
  return gcd(bb,aa%bb) if bb else aa
  

temp=0
for i in range(0,n):
  l_gcd=0
  r_gcd=0
  lis_left=a[:i]
  try:
    lis_right=a[i+1:]
  except IndexError:
    lis_right=[]
  if lis_left:
    for j in range(0,len(lis_left)):
      l_gcd=gcd(l_gcd,lis_left[j])
  if lis_right:
    for j in range(0,len(lis_right)):
      r_gcd=gcd(r_gcd,lis_right[j])
  gcdgcd=gcd(l_gcd,r_gcd)
  if gcdgcd>temp:
    temp=gcdgcd

print(temp)

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

def gcd(a,b):
  aa=max(a,b)
  bb=min(a,b)
  return gcd(bb,aa%bb) if bb else aa
  

left=[]
right=[]
for i in range(0,n):
  j=n-i-1
  if left:
    hahaha=gcd(left[i-1],a[i])
    left.append(hahaha)
  else:
    left.append(a[i])
  if right:
    hahaha=gcd(right[i-1],a[j])
    right.append(hahaha)
  else:
    right.append(a[j])
    
keep=0
for i in range(0,n):
  if i==0:
    temp=right[-2]
  elif i==n-1:
    temp=left[-2]
  else:
    temp=gcd(left[i-1],right[n-i-2])
  if temp>keep:
    keep=temp

print(keep)
Buggy python submission (verdict: Runtime Error):
s=input()
le=len(s)
lis=[]
for i in range(0,le):
  if s[i]!="A" and s[i]!="" and s[i]!="T" and s[i]!="G":
    lis.append(i)
lo=0
for j in range(0,len(lis)-1):
  if lis[j+1]-lis[j]-1>=lo:
    lo=lis[j+1]-lis[j]-1
if lis[0]>=lo:
  lo=lis[j]
if le-lis[-1]-1>=lo:
  lo=le-lis[-1]-1
print(lo)

Fixed submission:
b=input()
if b=="A":
  print("T")
if b=="T":
  print("A")
if b=="C":
  print("G")
if b=="G":
  print("C")

Buggy python submission (verdict: Runtime Error):
s=input()
le=len(s)
lis=[]
for i in range(0,le):
  if s[i]!="A" and s[i]!="" and s[i]!="T" and s[i]!="G":
    lis.append(i)
lo=0
for j in range(0,len(lis)-1):
  if lis[j+1]-lis[j]-1>=lo:
    lo=lis[j+1]-lis[j]-1
if lis[0]>=lo:
  lo=lis[j]
if len(lis)-lis[-1]+1>=lo:
  lo=len(lis)-lis[-1]-1
print(lo)

Fixed submission:
b=input()
if b=="A":
  print("T")
if b=="T":
  print("A")
if b=="C":
  print("G")
if b=="G":
  print("C")

Buggy python submission (verdict: Runtime Error):
b=input()
if b=="A":
  print("T")
if b="T":
  print("A")
if b="C":
  print("G")
if b="G":
  print("C")


Fixed submission:
b=input()
if b=="A":
  print("T")
if b=="T":
  print("A")
if b=="C":
  print("G")
if b=="G":
  print("C")

Buggy python submission (verdict: Runtime Error):
b=input()
if b[i]=="A":
  print("T")
if b[i]=="T":
  print("A")
if b[i]=="C":
  print("G")
if b[i]=="G":
  print("C")


Fixed submission:
b=input()
if b=="A":
  print("T")
if b=="T":
  print("A")
if b=="C":
  print("G")
if b=="G":
  print("C")
Buggy python submission (verdict: Runtime Error):
import copy
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.pop(0)
for i in range(n-1):
  t=list(map(int,input().split()))
  k=t.pop(0)
  b=copy.deepcopy(a)
  for j in range(0,len(a)):
    if not b[j] in t:
      a.remove(a[j])
print(len(a))
  

Fixed submission:
import copy
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.pop(0)
for i in range(n-1):
  t=list(map(int,input().split()))
  k=t.pop(0)
  b=copy.deepcopy(a)
  for j in range(0,len(a)):
    if not b[j] in t:
      a.remove(b[j])
print(len(a))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
import copy
for i in range(10**4):
  a.sort()
  wari=a[-2]
  if wari==0:
    print(a[-1])
    break
  a[-1]=a[-1]%wari
  



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

def gcd(a,b):
  aa=max(a,b)
  bb=min(a,b)
  cc=aa%bb
  return gcd(bb,cc) if cc else bb
  
p=gcd(a[0],a[1])
for i in range(2,n):
  p=gcd(p,a[i])
print(p)
Buggy python submission (verdict: Runtime Error):
s=int(input()
if s==3 or s==5 or s==7:
      print("YES")
else:
      print("NO")

Fixed submission:
s=int(input())
if s==3 or s==5 or s==7:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
dic1={}
dic2={}
for i in range(0,n):
  if i%2==0:
    at=v[i]
    if at in dic1:
      dic1[at]+=1
    else:
      dic1[at]=1
  else:
    at=v[i]
    if at in dic2:
      dic2[at]+=1
    else:
      dic2[at]=1 

count1=0
count2=0
kep1=0
kep2=0
for i in range(len(dic1)):
  at=dic1.popitem()
  moji=at[0]
  count=at[1]
  if count>count2:
    kep2=moji
    count2=count
  if count2>count1:
    moji_tamotu=kep1
    count_tamotu=count1
    kep1=kep2
    kep2=moji_tamotu
    count1=count2
    count2=count_tamotu

odd_1_moji=kep1
odd_1_count=count1
odd_2_moji=kep2
odd_2_count=count2
    
count1=0
count2=0
kep1=0
kep2=0
for i in range(len(dic2)):
  at=dic2.popitem()
  moji=at[0]
  count=at[1]
  if count>count2:
    kep2=moji
    count2=count
  if count2>count1:
    moji_tamotu=kep1
    count_tamotu=count1
    kep1=kep2
    kep2=moji_tamotu
    count1=count2
    count2=count_tamotu

even_1_moji=kep1
even_1_count=count1
even_2_moji=kep2
even_2_count=count2

if even_1_moji!=odd_1_moji:
  kouho=[odd_1_moji,even_1_moji]*(n//2)
else:
  if even_1_count+odd_2_count>=even_2_count+odd_1_count:
    kouho=[odd_2_moji,even_1_moji]*2
  else:
    kouho=[odd_1_moji,even_2_moji]*2
    
res=0
for i in range(0,n):
  if v[i]!=kouho[i]:
    res+=1
print(res)
    


Fixed submission:
n=int(input())
v=list(map(int,input().split()))
dic1={}
dic2={}
for i in range(0,n):
  if i%2==0:
    at=v[i]
    if at in dic1:
      dic1[at]+=1
    else:
      dic1[at]=1
  else:
    at=v[i]
    if at in dic2:
      dic2[at]+=1
    else:
      dic2[at]=1 

count1=0
count2=0
kep1=0
kep2=0
for i in range(len(dic1)):
  at=dic1.popitem()
  moji=at[0]
  count=at[1]
  if count>count2:
    kep2=moji
    count2=count
  if count2>count1:
    moji_tamotu=kep1
    count_tamotu=count1
    kep1=kep2
    kep2=moji_tamotu
    count1=count2
    count2=count_tamotu

odd_1_moji=kep1
odd_1_count=count1
odd_2_moji=kep2
odd_2_count=count2
    
count1=0
count2=0
kep1=0
kep2=0
for i in range(len(dic2)):
  at=dic2.popitem()
  moji=at[0]
  count=at[1]
  if count>count2:
    kep2=moji
    count2=count
  if count2>count1:
    moji_tamotu=kep1
    count_tamotu=count1
    kep1=kep2
    kep2=moji_tamotu
    count1=count2
    count2=count_tamotu

even_1_moji=kep1
even_1_count=count1
even_2_moji=kep2
even_2_count=count2

if even_1_moji!=odd_1_moji:
  kouho=[odd_1_moji,even_1_moji]*(n//2)
else:
  if even_1_count+odd_2_count>=even_2_count+odd_1_count:
    kouho=[odd_2_moji,even_1_moji]*(n//2)
  else:
    kouho=[odd_1_moji,even_2_moji]*(n//2)
    
res=0
for i in range(0,n):
  if v[i]!=kouho[i]:
    res+=1
print(res)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
lis=[]
for i in range(h):
  lis.append(list(input()))
for i in range(0,len(lis)):
  i=len(lis)-i-1
  count=0
  for j in range(0,len(lis[0])):
    if lis[i][j]==".":
      count+=1
  if count==len(lis[0]):
    lis.pop(i)

for i in range(0,len(lis[0])):
  i=len(lis)-i-1
  count=0
  for j in range(0,len(lis)):
    if lis[j][i]==".":
      count+=1
  if count==len(lis):
    for k in range(len(lis)):
      lis[k].pop(i)

for i in range(len(lis[0])):
  moji=""
  for j in range(len(lis)):
    moji+=lis[i][j]
  print(moji)
    

Fixed submission:
h,w=map(int,input().split())
lis=[]
for i in range(h):
  lis.append(input())
tate=[]
yoko=[]
for i in range(0,w):
  for j in range(0,h):
    if lis[j][i]=="#":
      tate.append(i)
      break

for i in range(0,h):
  for j in range(0,w):
    if lis[i][j]=="#":
      yoko.append(i)
      break

for x in yoko:
  for y in tate:
    if y != tate[len(tate)-1]:
      print(lis[x][y],end="")
    else:
      print(lis[x][y])
Buggy python submission (verdict: Runtime Error):
n=int(input())
count=0
for i in range(0,30):
  for j in range(0,30):
    if i*4+j+7==30:
      print("Yes")
      break
    else:
      count+=1
if count==900:
  print("No")

Fixed submission:
n,k=map(int,input().split())
if n%k==0:
  print("0")
else:
  print("1")
Buggy python submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
a=list(map(int,input().split()))

keep=0
hidari=1
while keep<x:
  keep=a[hidari]
  hidari+=1

keep=10*100
migi=-1
while keep>x:
  keep=a[migi]
  migi-=1
  
print(min([hidari-1,-migi-2]))

Fixed submission:
n,m,x=map(int,input().split())
a=list(map(int,input().split()))

keep=0
hidari=a[0]
while hidari<x and keep<=m:
  keep+=1
  hidari=a[keep]
  
print(min(keep,m-keep))
Buggy python submission (verdict: Runtime Error):
n=int(input())
dic={}.fromkeys(map(str,input().split()))
if len(dic)==3:
  print("Three")
if len(dic)==4::
  print("Four")

Fixed submission:
n=int(input())
dic={}.fromkeys(map(str,input().split()))
if len(dic)==3:
  print("Three")
if len(dic)==4:
  print("Four")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%3==0 or b%3==0 or c%3==0:
  print("Possible")
else:
  print("Impossible")

Fixed submission:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
ababa=0
for i in range(n):
  count+=1
  keep=a[keep-1]
  if keep==2:
    ababa=1
    print(count)
    break
if ababa=0:
  print(-1)

Fixed submission:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
ababa=0
for i in range(n):
  count+=1
  keep=a[keep-1]
  if keep==2:
    ababa=1
    print(count)
    break
if ababa==0:
  print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
lis=[]
for i in range(n):
  count+=1
  if keep in lis:
    print(-1)
    break
  lis.append(keep)
  keep=a[keep-1]
  if keep==2:
    print(count)
    break

Fixed submission:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
ababa=0
for i in range(n):
  count+=1
  keep=a[keep-1]
  if keep==2:
    ababa=1
    print(count)
    break
if ababa==0:
  print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
lis=[]
while keep!=2:
  count+=1
  if keep in lis:
    print(-1)
    break
  lis.append(keep)
  keep=a[keep-1]
  if keep==2:
    print(count)
    break

Fixed submission:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
ababa=0
for i in range(n):
  count+=1
  keep=a[keep-1]
  if keep==2:
    ababa=1
    print(count)
    break
if ababa==0:
  print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
lis=[]
while keep!=2:
  count+=1
  if keep in lis:
    print(-1)
    break
  lis.append(keep)
  keep=a[keep-1]
  if keep==2:
    print(count)

Fixed submission:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
keep=1
count=0
ababa=0
for i in range(n):
  count+=1
  keep=a[keep-1]
  if keep==2:
    ababa=1
    print(count)
    break
if ababa==0:
  print(-1)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(["NO","YES"][(b*10+c)%4==0]

Fixed submission:
a,b,c=map(int,input().split())
print(["NO","YES"][(b*10+c)%4==0])
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c=map(int,input().split())
moda=a%b
keep=0
for i in range(0,10**8):
  if (moda*i)%b==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("No")

Fixed submission:
a,b,c=map(int,input().split())
moda=a%b
keep=0
for i in range(1,10**6):
  if (moda*i)%b==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
moda=a%k
keep=0
for i in range(0,10**8):
  if (moda*i)%k==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("No")

Fixed submission:
a,b,c=map(int,input().split())
moda=a%b
keep=0
for i in range(1,10**6):
  if (moda*i)%b==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("NO")
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
for i in range(n):
  a.append(input())
b=[]
for i in range(m):
  b.append(input())

res=0
for i in range(0,n-m+1):
  keep=0
  for j in range(i,i+m):
    if b[j-i] in a[j]:
      keep+=1
  if keep==m:
    print("Yes")
    res=1
    break
if res=0:
  print("No")


Fixed submission:
n,m=map(int,input().split())
a=[]
for i in range(n):
  a.append(input())
b=[]
for i in range(m):
  b.append(input())

res=0
for i in range(0,n-m+1):
  for k in range(0,n-m+1):
    keep=0
    for j in range(i,i+m):    
      if b[j-i] in a[j][k:k+m]:
        keep+=1
      if keep==m:
        print("Yes")
        res=1
        break
  if res==1:
    break
if res==0:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
k,s=map(int,input().split())
count=0
for i in range(0,k+1):
  for j in range(0,k+1):
    for k in range(0,k+1):
      if i+j+k==s:
        count+=1
print(count)

Fixed submission:
k,s=map(int,input().split())
count=0
for x in range(0,k+1):
  for y in range(0,k+1):
    z=s-x-y
    if 0<=z<=k:
      count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if (a==5 and b=5 and c==7) or(a==5 and c==5 and b==7) or (c==5 and b==5 and a==7):
  print("YES")
else:
  print("NO")

Fixed submission:
a,b,c=map(int,input().split())
if (a==5 and b==5 and c==7) or(a==5 and c==5 and b==7) or (c==5 and b==5 and a==7):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N,K = list(int(t) for t in input().split())
price = list(int(t) for t in input().split())
price.sort()
total = sum(price[0,K])
print(total)

Fixed submission:
N,K = input().split()
price = list(int(t) for t in input().split())
price_s = sorted(price)
total = sum(price_s[0:int(K)])
print(total)
Buggy python submission (verdict: Runtime Error):
n = 5
Si = n(n+1)/2
lst = list(map(int,input().split()))
Sr = sum(lst)
print(Si-Sr)

Fixed submission:
n = 5
Si = n*(n+1)/2
lst = list(map(int,input().split()))
Sr = sum(lst)
print(int(Si-Sr))
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

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

K = int(input())
box = []
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            box.append(gcd(a,b,c))
print(sum(box))

Fixed submission:
import math
from functools import reduce

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

K = int(input())
box = []
for a in range(1,K+1):
    for b in range(a,K+1):
        for c in range(b,K+1):
            if a==b and b==c:
                box.append(gcd(a,b,c))
            elif a!=b and b!=c and c!=a:
                box.append(gcd(a,b,c)*6)
            else:
                box.append(gcd(a,b,c)*3)
print(sum(box))
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
m = n
while m > k/2:
  m = abs(n-k)
  if n == m:
    break
print(m)

Fixed submission:
n,k = map(int,input().split())
m = n
m = m%k
if m > int(k/2):
  ans = abs(m-k)
else:
  ans = m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
while n > k/2:
  n = abs(n-k)
print(n)

Fixed submission:
n,k = map(int,input().split())
m = n
m = m%k
if m > int(k/2):
  ans = abs(m-k)
else:
  ans = m
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
 
ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
        j -= 1
        ans = max(ans, i + j)
print(ans)


Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
 
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)

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

a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
	j -= 1
	ans = max(ans, i + j)
print(ans)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
 
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
Buggy python submission (verdict: Runtime Error):
s = int(input())
for i in range(1,10):
  if (1000 * i) > s:
    return print((1000 * i) - s)

Fixed submission:
s = int(input())
for i in range(1,11):
  if (1000 * i) >= s:
    print((1000 * i) - s)
    break
Buggy python submission (verdict: Runtime Error):
X,N = map(int, input().split())
P = map(list,int(input.split()))
direction = -1
i = 0
while True:
    dist = i * direction

    if not (dist + X in P):
        print(dist + X)
        break
    i += 1
    if direction < 0: direction = 1
    else : direction = -1

Fixed submission:
X,N = map(int, input().split())
if N > 0: 
    P = list(map(int,input().split()))
    direction = -1
    i = 1
    if not X in P:
        print(X)
    else:
        while True:
            dist = i * direction
            val = dist+X
            if not (val in P):
                print(val)
                break
            if direction < 0: direction = 1
            else : 
                direction = -1
                i+=1
else: 
    print(X)
Buggy python submission (verdict: Runtime Error):
print(int(a+a**2+a**3))

Fixed submission:
a=int(input())
print(a+a**2+a**3)

Buggy python submission (verdict: Runtime Error):
print(a + a ** 2 + a ** 3)

Fixed submission:
a=int(input())
print(a+a**2+a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
print(a + a ** 2 + a ** 3)

Fixed submission:
a=int(input())
print(a+a**2+a**3)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
n = 0
for i in s:
  for j in t:
    if i != j:
      i = j
      n += 1
return n

Fixed submission:
s = input()
t = input()
n = len(s)
ans = 0
for i in range(n):
  if s[i] != t[i]:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
def main():
    arg = int(input())
    ans = arg + arg ** 2 + arg ** 3
    print(str(ans))


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    a, b = (int(i) for i in input().split())
    print(str(a * b))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
age, price = (int(x) for x in input().split(' '))

if age <= 5:
    print('0')
elif age >= 6 & age <= 12:
    print(f'{price // 2}')
else:
    print(f'{price}')


Fixed submission:
age, price = (int(x) for x in input().split(' '))

if age <= 5:
    print('0')
elif 6 <= age <= 12:
    print('{}'.format(price // 2))
else:
    print('{}'.format(price))
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input(),split())
c = (a-1) * (b-1)
print(c)

Fixed submission:
a,b=map(int, input().split())
c=(a-1)*(b-1)
print(c)
Buggy python submission (verdict: Runtime Error):
a, b, k  = map(int, input().split())
if a + b =<k:
    ansa=0
    ansb=0
elif k=>a:
    ansa=0
    ansb=a+b-k
else:
    ansa=a-k
    ansb=b

print(ansa + " "+ ansb)

Fixed submission:
a, b, k  = map(int, input().split())
if a + b <=k:
    ansa=0
    ansb=0
elif k>=a:
    ansa=0
    ansb=a+b-k
else:
    ansa=a-k
    ansb=b

print(ansa, ansb)
Buggy python submission (verdict: Runtime Error):
import math
a, b=map(int, input().split())


def lcm(x, y):
    return (x*y) // math.gcd(x, y)

print(lcm(a, b))


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


def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)

print(lcm(a, b))

Buggy python submission (verdict: Runtime Error):
a, b=map(int, input().split())
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)




print(lcm(a, b))


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


def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)

print(lcm(a, b))
Buggy python submission (verdict: Runtime Error):

a, b = map(int, input().split())

a=int(0)
x=max([a, b])
y=min([a, b])

if x+y % 3 ==0 and x < y*2:
    a=int(1)

n=(x+y)/3
r=(x-y)/2
n2=int(1)
r2=int(1)
r3=int(1)
for i in range(n):
    n2=n2*(i+1)
for i in range(r):
    r2=r2*(i+1)
for i in range(n-r):
    r3=r3*(i+1)
ans=(n2/r2/r3)//(10**9+7)

if a==1:
    print(ans)
else:
    print(a)


Fixed submission:

a, b = map(int, input().split())

aa=int(0)
x=max([a, b])
y=min([a, b])

if (x+y)%3 ==0 and x <= y*2:
    aa=int(1)

n=int((x+y)/3)
k=int((n-(x-y))/2)


def comb(n, k, mod=10**9+7):
    numer = denom = 1
    for i in range(k):
        numer = (numer * (n-i)) % mod
        denom = (denom * (i+1)) % mod
    return (numer * pow(denom, mod-2, mod)) % mod

if aa==1:
    print(comb(n,k))
else:
    print(aa)
Buggy python submission (verdict: Runtime Error):
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if n ==1:
        break
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1
    if i > n:
        break
print(len(s))

Fixed submission:
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if n ==1 or n==0:
        break
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1
    if i >= n:
        break
print(len(s))

Buggy python submission (verdict: Runtime Error):
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if i > n:
        break
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1

print(len(s))


Fixed submission:
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if n ==1 or n==0:
        break
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1
    if i >= n:
        break
print(len(s))

Buggy python submission (verdict: Runtime Error):
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1
    if i >=n:
        break
print(len(s))


Fixed submission:
n=int(input())
S=str(input())
s=list(S)
i=1
while True:
    if n ==1 or n==0:
        break
    if s[i-1]==s[i]:
        s.pop(i)
        n -= 1
    else:
        i +=1
    if i >= n:
        break
print(len(s))
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=float(0)
if n%2=0:
    ans=1/2
else:
    ans=(n//2)+1

print(ans)


Fixed submission:
n=float(input())
ans=float(0)
if n%2==0:
    ans=1/2
else:
    ans=((n//2)+1)/n

print(ans)
Buggy python submission (verdict: Runtime Error):
6
AC
TLE
AC
AC
WA
TLE

Fixed submission:
N = int(input())
status={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
results = [input() for n in range(N)]
for result in results:
     if result in status.keys():
         status[result] += 1
for k, v in status.items():
    print('{} x {}'.format(k, v))
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if a*b // 2 == 0:
  print('Even')
  else:
  	print('Odd')

Fixed submission:
a,b = map(int, input().split())
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')