Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
import numpy as np

def list_prime(max):
    primes = []
    for i in range(1, max):
        if max % i == 0:
            primes.append(i)
        if i >= np.sqrt(max):
            break
    if len(primes) == 1:
        primes.append(max)
    return primes

def solve(N: int):
    print(len(str(max(int(N / list_prime(N)[-1]), list_prime(N)[-1]))))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3
import sys
import numpy as np

def list_prime(max):
    primes = []
    for i in range(1, max):
        if max % i == 0:
            primes.append(i)
        if i >= np.sqrt(max):
            break
    if len(primes) <= 1:
        primes.append(max)
    return primes

def solve(N: int):
    print(len(str(max(int(N / list_prime(N)[-1]), list_prime(N)[-1]))))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def a():
    s, t  = input().split()
    print(s)
    print(t)
    s_n, t_n = input().split()
    u = input()
    print(u)
    if u == s:
        s_n = int(s_n) - 1
    elif t == u:
        t_n = int(t_n) - 1
    return f"{s_n} {t_n}"
a()

Fixed submission:
def a():
    s, t  = input().split()
    s_n, t_n = input().split()
    u = input()
    if u == s:
        s_n = int(s_n) - 1
    elif t == u:
        t_n = int(t_n) - 1
    return str(s_n) + " " + str(t_n)
print(a())
Buggy python submission (verdict: Time Limit Exceeded):
s=str(input())

p1 = '01'
p2 = '10'
s = s[::-1]
c = 0
flag = True
while flag:
  flag = False
  for i in range(len(s)):
    if s[i:i+4] in ('0011','1100','1010','0101','1001','0110'):
      s = s[:i] + s[i+4:]
      c += 4
      flag = True
      break
    
    
    if s[i:i+2] in (p1,p2):
      s = s[:i] + s[i+2:]
      c += 2
      flag = True
      break
print(c)

Fixed submission:
s=str(input())
c1 = 0
c0 = 0
for i in range(len(s)):
  if s[i] == '1':
    c1 += 1
  if s[i] == '0':
    c0 += 1
print(2*min(c1,c0))

Buggy python submission (verdict: Runtime Error):
s=str(input())

p1 = '01'
p2 = '10'
s = s[::-1]
c = 0
flag = True
while flag:
  flag = False
  for i in range(len(s)):
    if s[i:i+4] == in('0011','1100','1010','0101','1001','0110'):
      s = s[:i] + s[i+4:]
      c += 4
      flag = True
      break
    
    
    if s[i:i+2] in [p1,p2]:
      s = s[:i] + s[i+2:]
      c += 2
      flag = True
      break
print(c)

Fixed submission:
s=str(input())
c1 = 0
c0 = 0
for i in range(len(s)):
  if s[i] == '1':
    c1 += 1
  if s[i] == '0':
    c0 += 1
print(2*min(c1,c0))

Buggy python submission (verdict: Time Limit Exceeded):
s=str(input())

p1 = '01'
p2 = '10'
s = s[::-1]
c = 0
flag = True
while flag:
  flag = False
  for i in range(len(s)):
    if s[i:i+2] in [p1,p2]:
      s = s[:i] + s[i+2:]
      c += 2
      flag = True
      break
print(c)

Fixed submission:
s=str(input())
c1 = 0
c0 = 0
for i in range(len(s)):
  if s[i] == '1':
    c1 += 1
  if s[i] == '0':
    c0 += 1
print(2*min(c1,c0))
Buggy python submission (verdict: Runtime Error):
import numpy as np

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a[0]

delta = []
for i in range(0,len(x) - 1):
    delta.append(x[i + 1] - x[i])

if n == 1:
    print(np.sum(delta))
else:
    delta = np.sort(delta)
    f = delta.size - (n - 2)
    print(np.sum(delta[0:f:]))

Fixed submission:
import numpy as np

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a1[0]

delta = []
if len(x) <= n:
    print(0)
else:
    for i in range(0,len(x) - 1):
        delta.append(x[i + 1] - x[i])

    if n == 1:
        print(np.sum(delta))
    else:
        delta = np.sort(delta)
        f = delta.size - (n - 2)
        print(np.sum(delta[0:-(n-1):]))

Buggy python submission (verdict: Runtime Error):
import numpy as np

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a[0]

delta = []
for i in range(0,len(x) - 1):
    delta.append(x[i + 1] - x[i])

if n == 1:
    print(np.sum(delta))
else:
    delta = np.sort(delta)
    print(np.sum(delta[0:delta.size - (n - 2)]))

Fixed submission:
import numpy as np

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a1[0]

delta = []
if len(x) <= n:
    print(0)
else:
    for i in range(0,len(x) - 1):
        delta.append(x[i + 1] - x[i])

    if n == 1:
        print(np.sum(delta))
    else:
        delta = np.sort(delta)
        f = delta.size - (n - 2)
        print(np.sum(delta[0:-(n-1):]))
Buggy python submission (verdict: Runtime Error):
H, N = input().split()
A = list(map(,int input().split()))

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
H, N = input().split()
A = list(input().split())

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
H, N = input().split()
A = []
A = input().split()

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
H, N = input().split()
A = input().split()

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")

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

if int(H)-sum(A) <=0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
H = map(int, input().split())

num = 1
res = 1

if H > 1:
    while (num * 2) <= H:
        num = num * 2
        res = num * 2 - 1

print(res)

Fixed submission:
H = int(input())

num = 1
res = 1

if H > 1:
    while (num * 2) <= H:
        num = num * 2
        res = num * 2 - 1

print(res)
Buggy python submission (verdict: Runtime Error):
N,M=input().split()

Cor = N-M
if Cor == 0:
    print("yes")
else:
    print("no")

Fixed submission:
N, M = input().split()

Cor = int(N)-int(M)
if Cor == 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N,M=input().split()

Cor = N-M
if Cor == N:
    print("yes")
else:
    print("no")

Fixed submission:
N, M = input().split()

Cor = int(N)-int(M)
if Cor == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b = input().split()

bigA = a*int(b)
bigB = b*int(a)

if bigA < bigB:
    print(bigA)
elif bigA = bigB:
    print(bigA)
else:
    print(bigB)

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

bigA = a*int(b)
bigB = b*int(a)

if bigA < bigB:
    print(bigA)
elif bigA == bigB:
    print(bigA)
else:
    print(bigB)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = list(map(int, input().split()))

time = 0

while time < K:
    if A == 0 and B > 0:
        B = B - 1
    if A > 0:
        A = A - 1
    time = time + 1
A = str(A)
B = str(B)
print(A+" "+B)

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

if A >= K:
    A = A - K
    A = str(A)
    B = str(B)
    print(A+" "+B)
else:
    K = K - A
    if B <= K:
        print("0 0")
    if B > K:
        B = B - K
        A = "0"
        B = str(B)
        print(A+" "+B)
Buggy python submission (verdict: Runtime Error):
A = input().split()
B = input().split()

Cor = 6-int(A)-int(B)
print(Cor)

Fixed submission:
A = input()
B = input()

Cor = 6-(int(A)+int(B))
print(Cor)

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

Cor = 6-int(A)-int(B)
print(Cor)

Fixed submission:
A = input()
B = input()

Cor = 6-(int(A)+int(B))
print(Cor)
Buggy python submission (verdict: Runtime Error):
A_1, A_2, A_3 = int(input()).split()

Score = A_1+A_2+A_3
if Score <= 21:
    print(win)
else:
    print(bust)

Fixed submission:
A_1, A_2, A_3 = input().split()

Score = int(A_1)+int(A_2)+int(A_3)
if Score <= 21:
    print("win")
else:
    print("bust")
Buggy python submission (verdict: Runtime Error):
N = input()

print(N*N*N)

Fixed submission:
N = int(input())

print(N*N*N)
Buggy python submission (verdict: Runtime Error):
a = input()
s = input()

if int(a) >= 3200:
    print(s)
else:
    print(red)

Fixed submission:
a = input()
s = input()

if int(a) >= 3200:
    print(s)
else:
    print("red")
Buggy python submission (verdict: Runtime Error):
N, K = (int(x) for x in input().split())
P = [int(x) for x in input().split()]

P2 = [(n*(n+1))/2/n for n in P]

S = sum(P2[:K])
max_s = S
for i in range(1, N-K):
    S -= P2[i-1]
    S += P2[i+K]

    max_s = max(max_s, S)

print(f'{max_s:.9f}')


Fixed submission:
N, K = (int(x) for x in input().split())
P = [int(x) for x in input().split()]

# (n*(n+1))/2 /n == (n+1)/2

P2 = [(n+1) for n in P]

S = sum(P2[:K])
max_s = S
for i in range(1, N-K+1):
    S -= P2[i-1]
    S += P2[i+K-1]

    max_s = max(max_s, S)

# print(f'{max_s:.9f}')
print('{:.10f}'.format(max_s/2))
Buggy python submission (verdict: Runtime Error):
S=input()
for i in range(len(S)):
  print("x",enmd="")

Fixed submission:
S=input()
for i in range(len(S)):
  print("x",end="")
Buggy python submission (verdict: Runtime Error):
C=input()
for i in range(len(string.ascii_lowercase)):
  if(string.ascii_lowercase[i]==C):
    print(string.ascii_lowercase[i+1])


Fixed submission:
import string
C=input()
for i in range(len(string.ascii_lowercase)):
  if(string.ascii_lowercase[i]==C):
    print(string.ascii_lowercase[i+1])
Buggy python submission (verdict: Runtime Error):
K,X=map(int,input().split())
if(500*K>=X):
  print("Yes")
else:
  print("No)

Fixed submission:
K,X=map(int,input().split())
if(500*K>=X):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce
import math
import sys

def num_double(n):
	return int(n/2)

def main():
  N,M=map(int,input().split())
  numList=list(map(int,input().split()))
  numList=list(map(num_double,numList))
  numList=list(set(numList))
  
  flag=0
  finFlag=0
  evenCount=0
  
  while flag==0:
    evenCount=0
    for i in range(len(numList)):
      if(numList[i]%2==0):
        evenCount+=1
        M=math.floor(M/2)
    if(evenCount==len(numList)):
      numList=list(map(num_double,numList))
    elif(evenCount==0):
      flag=1
    else:
      flag=1
      finFlag=1
  
  if(finFlag==1):
    print("0")
    sys.exit()
  
  def lcm_base(x, y):
      return (x * y) // fractions.gcd(x, y)

  def lcm_list(numbers):
      return reduce(lcm_base, numbers, 1)

  endFlag=0
  count=0
  nowMagnification=1
  nowNum=0
  startNum=lcm_list(numList)
  
  else:
    while endFlag==0:
      nowNum=startNum*nowMagnification
      if(1<=nowNum)and(nowNum<=M):
        count+=1
        nowMagnification+=2
      else:
        endFlag=1

  print(count)


if __name__ == '__main__':
    main()

Fixed submission:
import fractions
from functools import reduce
import math
import sys

def num_double(n):
	return int(n/2)

def main():
  N,M=map(int,input().split())
  numList=list(map(int,input().split()))
  numList=list(map(num_double,numList))
  numList=list(set(numList))
  
  count=0
  flag=0
  finFlag=0
  evenCount=0
  
  while flag==0:
    evenCount=0
    for i in range(len(numList)):
      if(numList[i]%2==0):
        evenCount+=1
    if(evenCount==len(numList)):
      numList=list(map(num_double,numList))
      M=math.floor(M/2)
    elif(evenCount==0):
      flag=1
    else:
      flag=1
      finFlag=1
  
  if(finFlag==1):
    print(count)
    sys.exit()
  
  else:
    def lcm_base(x, y):
        return (x * y) // fractions.gcd(x, y)

    def lcm_list(numbers):
        return reduce(lcm_base, numbers, 1)

    endFlag=0
    nowMagnification=1
    nowNum=0
    startNum=lcm_list(numList)

    while endFlag==0:
      nowNum=startNum*nowMagnification
      if(1<=nowNum)and(nowNum<=M):
        count+=1
        nowMagnification+=2
        continue
      else:
        endFlag=1

    print(count)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if(k>a):
  a=0
  k=k-a
  if(k>=b):
    b=0
  else:
    b=b-k
else:
  a=a-k

print("{} {}".format(a,b))
  

Fixed submission:
s=input().split()
print("{}{}".format(s[1],s[0]))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))
  

Fixed submission:
s=input().split()
print("{}{}".format(s[1],s[0]))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))

Fixed submission:
s=input().split()
print("{}{}".format(s[1],s[0]))
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k=list(map(int,input().split()))
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))

Fixed submission:
A,B,K=map(int,input().split())
print(max(A-K,0),max(B-max(K-A,0),0))
Buggy python submission (verdict: Runtime Error):
num=int(input())
fig=list(map(int,input().split()))
 
Even_flag=0
count=0
 
while Even_flag=0:
  for i in range(num):
    if fig[num]%2==1:
      Even_flag==1:
      break
    else:
      fig[num]=fing[num]/2
      if i==num-1:
        count+=1
  
print(count)

Fixed submission:
num=int(input())
fig=list(map(int,input().split()))
 
Even_flag=0
count=0
 
while Even_flag==0:
  for i in range(num):
    if fig[i]%2==1:
      Even_flag=1
      break
    else:
      fig[i]=fig[i]/2
      if i==num-1:
        count+=1
        
print(count)

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

Even_flag=0
count=0

while Even_flag=0:
  for i in range(num):
    if fig[num]%2==1:
      Even_flag==1:
      break
    else:
      fig[num]=fing[num]/2
  count+=1
  
print(count)
    
	

Fixed submission:
num=int(input())
fig=list(map(int,input().split()))
 
Even_flag=0
count=0
 
while Even_flag==0:
  for i in range(num):
    if fig[i]%2==1:
      Even_flag=1
      break
    else:
      fig[i]=fig[i]/2
      if i==num-1:
        count+=1
        
print(count)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input())

if N == M:
    print("Yes")

else:
    print("No")

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

if N == M:
    print("Yes")

else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input())

if N = M:
    print("Yes")

else:
    print("No")

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

if N == M:
    print("Yes")

else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = list(map(int, input().split()))
num = 0
ans = 0

for i in range(1,N):
    for j in range(i, N):
        if H[j-1] >= H[j]:
            num +=1
        else:
            break
    
    if num > ans:
        ans = num
    num = 0

print(ans)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
num = 0
ans = 0


for j in range(1, N):
    if H[j-1] >= H[j]:
        num +=1
        # print(num)
    else:
        if num > ans:
            ans = num
        num = 0
else:
    if num > ans:
        ans = num



print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 0

for i in range(1, N):
    ans += i

print(ans)

Fixed submission:
N = int(input())

ans = (N-1)*N//2 +7
ans -=7

print(ans)
Buggy python submission (verdict: Runtime Error):
a = int(input().split())

print(3*a*a)

Fixed submission:
a = int(input())

print(3*a*a)
Buggy python submission (verdict: Runtime Error):
n, d = map(int, input().split())
if n//(2*d+1) % 0:
    print(n/(2*d+1))
else:
    print(n//(2*d+1)+1)

Fixed submission:
n, d = map(int, input().split())
if n%(2*d+1) == 0:
    print(n//(2*d+1))
else:
    print(n//(2*d+1)+1)

Buggy python submission (verdict: Runtime Error):
n, d = int(input().split())

if n/(2*d+1) == 0:
    print(n/(2*d+1))
else:
    print(n//(2*d+1)+1)

Fixed submission:
n, d = map(int, input().split())
if n%(2*d+1) == 0:
    print(n//(2*d+1))
else:
    print(n//(2*d+1)+1)
Buggy python submission (verdict: Runtime Error):
A, B =int(input().split())

if A >= 13:
    print(B)
elif A >= 6:
    print(B//2)
else:
    print(0)

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

if A >= 13:
    print(B)
elif A >= 6:
    print(B//2)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N = int(input())

ans = 0

for(i = 1; i <= N; i++):
    ans +=1

print(i)

Fixed submission:
N = int(input())

ans = 0

for i in range(1, N+1):
    ans +=i

print(ans)
Buggy python submission (verdict: Runtime Error):
import bisect,collections,copy,heapq,itertools,math,numpy,string
from fractions import gcd
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = S()
    L = [i for i in N]

    for i, num in enumerate(L):
        if(i != 0 and num == "B"):
            L[i-1] = ""

    L.remove("B")
    print("".join(L))

if __name__ == '__main__':
    main()

Fixed submission:
import bisect,collections,copy,heapq,itertools,math,numpy,string
from fractions import gcd
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = S()
    L = [i for i in N]
    ans = []

    for i, num in enumerate(L):
        if(num != "B"):
            ans.append(num)
        if(ans != [] and num == "B"):
            ans.pop(-1)

    print("".join(ans))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
num = list(map(int, input().split()))

num = num.sorted
if(num[0]==5 and num[1]==5 and num[2] == 7):
    print("YES")
else:
    print("NO")

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

ans = sorted(num)
if(ans[0]==5 and ans[1]==5 and ans[2] == 7):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
args0 = input()
args = input().split()

a=len(args)
if len(set(args))) == a:
	print("YES")
else:
	print("NO")



Fixed submission:
args0 = input()
args = input().split()

a=len(args)
if len(set(args)) == a:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
for i in A:
	B = A[:]
	B.remove(i)
	print(max(B))

	

Fixed submission:
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
max_1 = max(A)
B = A[:]
B.remove(max_1)
max_2 = max(B)

for i in A:
	if i == max_1:
		print(max_2)
	else:
		print(max_1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
for i in A:
	B = A[:]
	B.remove(i)
	print(max(B))

	

Fixed submission:
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
max_1 = max(A)
B = A[:]
B.remove(max_1)
max_2 = max(B)

for i in A:
	if i == max_1:
		print(max_2)
	else:
		print(max_1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
for i in range(len(A)):
	B = A[:]
	B.pop(i)
	print(max(B))


Fixed submission:
N = int(input())
A = []
B = []
for i in range(N):
	A.append(int(input()))
	
max_1 = max(A)
B = A[:]
B.remove(max_1)
max_2 = max(B)

for i in A:
	if i == max_1:
		print(max_2)
	else:
		print(max_1)
Buggy python submission (verdict: Runtime Error):
import math

A,B=map(int,input().split())
g=math.gcd(A,B)

n=int(A*B/g)

print(n)


Fixed submission:
A,B=map(int,input().split())
def gcd(A,B):
    while B!=0:
        A,B=B,A%B
    return A
print(int(A*B/gcd(A,B)))

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

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

n=int(A*B/math.gcd(A,B))

print(n)


Fixed submission:
A,B=map(int,input().split())
def gcd(A,B):
    while B!=0:
        A,B=B,A%B
    return A
print(int(A*B/gcd(A,B)))

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

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

n=int(A*B/math.gcd(A,B))

print(n)


Fixed submission:
A,B=map(int,input().split())
def gcd(A,B):
    while B!=0:
        A,B=B,A%B
    return A
print(int(A*B/gcd(A,B)))

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

for i in range(1,A*B+1):
    if i%A==0 and i%B==0:
        print(i)
        break


Fixed submission:
A,B=map(int,input().split())
def gcd(A,B):
    while B!=0:
        A,B=B,A%B
    return A
print(int(A*B/gcd(A,B)))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))

x = "YES"
k = 0
for i in l:
  k += 1
  for j in l[k:]:
    if i == j:
      x = "NO"
      break

print(x)

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

A = len(l)
B = len(set(l))
if A == B:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input().split();
    lsitA.sort();
#    newlistA = sorted(listA);
#    print(newlistA);

    for i in range(int(StringN)-1):
#        print(newlistA[i]);
#        print(newlistA[i+1]);
        if lsitA[i] == lsitA[i+1]:
            print('No');
#            print (i)
            return 0;
    print('Yes');


main();

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input().split();
    listA.sort();
#    newlistA = sorted(listA);
#    print(newlistA);

    for i in range(int(StringN)-1):
#        print(newlistA[i]);
#        print(newlistA[i+1]);
        if listA[i] == listA[i+1]:
            print('NO');
#            print (i)
            return 0;
    print('YES');


main();
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    StringS = input();
    StringT = input();

    print(StringT+StringS);

main()


Fixed submission:
# -*- coding: utf-8 -*-
def main():
    StringS,StringT = input().split();

    print(StringT+StringS);

main()
Buggy python submission (verdict: Runtime Error):
str = [int(input()) for i in range(1)]
#input_sum = sum(str)
ans = str[0] * str[1]
print(ans)

Fixed submission:
import fractions

str = input()
astr, bstr = str.split(" ")
a = int(astr)
b = int(bstr)

ans =  int((a*b)/ fractions.gcd(a, b))
print(ans)
Buggy python submission (verdict: Runtime Error):
str = [int(input()) for i in range(3)]
input_sum = sum(str)
if input_sum >= 22:
    print("true")
else:
    print("win")


Fixed submission:
str = [int(i) for i in input().split(" ")]
input_sum = sum(str)
if input_sum >= 22:
    print("bust")
else:
    print("win")