Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))
ls = [['#']*100 for i in range(50)] + [['.']*100 for i in range(50)]
i,j = 0,0
for c in range(a - 1):
    ls[i][j] = '.'
    if i >= 98:
        j = 0;i += 2
    else:
        j += 2
i,j = 51,0
for c in range(b - 1):
    ls[i][j] = '#'
    if i >= 98:
        j = 0;i += 2
    else:
        j += 2
print(100,100)
for j in range(100):
    print(''.join(ls[j]))

Fixed submission:
a,b = list(map(int,input().split()))
ls = [['#']*99 for i in range(49)] + [['.']*99 for i in range(49)]
i,j = 0,0
for c in range(a - 1):
    ls[i][j] = '.'
    if j >= 97:
        j = 0;i += 2
    else:
        j += 2
i,j = 51,0
for c in range(b - 1):
    ls[i][j] = '#'
    if j >= 97:
        j = 0;i += 2
    else:
        j += 2
print(98,99)
for j in range(98):
    print(''.join(ls[j]))

Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))
ls = [['#']*100 for i in range(50)] + [['.']*100 for i in range(50)]
i,j = 0,0
for c in range(a - 1):
    ls[i][j] = '.'
    if i >= 98:
        j = 0;i += 2
    else:
        j += 2
i,j = 51,0
for c in range(b - 1):
    ls[i][j] = '#'
    if i >= 98:
        j = 0;i += 2
    else:
        j += 2

for j in range(100):
    print(''.join(ls[j]))

Fixed submission:
a,b = list(map(int,input().split()))
ls = [['#']*99 for i in range(49)] + [['.']*99 for i in range(49)]
i,j = 0,0
for c in range(a - 1):
    ls[i][j] = '.'
    if j >= 97:
        j = 0;i += 2
    else:
        j += 2
i,j = 51,0
for c in range(b - 1):
    ls[i][j] = '#'
    if j >= 97:
        j = 0;i += 2
    else:
        j += 2
print(98,99)
for j in range(98):
    print(''.join(ls[j]))
Buggy python submission (verdict: Runtime Error):
h,w,d = map(int,input().split())
hw = {}
for i in range(h):
        check = list(map(int,input().split()))
        for j in range(w):
                hw[check[j]] = [i+1,j+1]
q = int(input())
for i in range(q):
        l,r = map(int,input().split())
        x,y = hw[l][0],hw[l][1]
        check = 0
        while True:
                if l == r:print(check);break
                l = (d + l)%(h*w)
                check += abs(hw[l][0]-x) + abs(hw[l][1]-y)
                x,y = hw[l][0],hw[l][1]

Fixed submission:
h,w,d = map(int,input().split())
hw = [[-1,-1]]*(h*w)
for i in range(h):
        ls = list(map(int,input().split()))
        for j in range(len(ls)):
                hw[ls[j]-1] = [j,i]
check = [0]*(h*w)
for i in range(h*w):
        if i + d > h*w-1:break
        check[i] = abs(hw[i][0]-hw[i+d][0]) + abs(hw[i][1]-hw[i+d][1])
ios = [0]*(w*h)
for i in range(d):
        c = 0;beforj = 0
        for j in range(h*w-1-i,-1,-d):
                if c == 0:c = 1;beforj = j;continue
                ios[j] = ios[beforj] + check[j]
                beforj = j
q = int(input())
for i in range(q):
        l,r = map(int,input().split())
        print(ios[l-1]-ios[r-1])

Buggy python submission (verdict: Time Limit Exceeded):
h,w,d = map(int,input().split())
check = [[0,0]]*h*w
for i in range(h):
    c = 1
    for j in list(map(int,input().split())):
        check[j-1] = [c,i+1]
        c += 1
q = int(input())
for i in range(q):
    l,r = map(int,input().split())
    ans = 0;c = True
    if r == l:c = False
    while c:
        hn,wn = check[l-1][0],check[l-1][1]
        x,y = check[(l+d)%(h*w)-1][0],check[(l+d)%(h*w)-1][1]
        ans += abs(hn-x)+abs(wn-y)
        if r == (l+d)%(h*w):break
        l = (l+d)%(h*w)
    print(ans)

Fixed submission:
h,w,d = map(int,input().split())
hw = [[-1,-1]]*(h*w)
for i in range(h):
        ls = list(map(int,input().split()))
        for j in range(len(ls)):
                hw[ls[j]-1] = [j,i]
check = [0]*(h*w)
for i in range(h*w):
        if i + d > h*w-1:break
        check[i] = abs(hw[i][0]-hw[i+d][0]) + abs(hw[i][1]-hw[i+d][1])
ios = [0]*(w*h)
for i in range(d):
        c = 0;beforj = 0
        for j in range(h*w-1-i,-1,-d):
                if c == 0:c = 1;beforj = j;continue
                ios[j] = ios[beforj] + check[j]
                beforj = j
q = int(input())
for i in range(q):
        l,r = map(int,input().split())
        print(ios[l-1]-ios[r-1])
Buggy python submission (verdict: Runtime Error):
n = int(input())
strs = [int(x) for x in str(n)]
kijyun = [9]*(len(strs)-1)
if strs[1:] == kijyun:
    print((len(strs)-1)*9+strs[1])
else:
    print((len(strs)-1)*9+strs[1]-1)

Fixed submission:
n = int(input())
strs = [int(x) for x in str(n)]
kijyun = [9]*(len(strs)-1)
if strs[1:] == kijyun:
    print((len(strs)-1)*9+strs[0])
else:
    print((len(strs)-1)*9+strs[0]-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
strs = [int(x) for x in str(n)]
kijyun = [9]*(len(strs)-1)
if strs[1:] == kijyun:
    print((n-1)*9+strs[1])
else:
    print((n-1)*9+strs[1]-1)

Fixed submission:
n = int(input())
strs = [int(x) for x in str(n)]
kijyun = [9]*(len(strs)-1)
if strs[1:] == kijyun:
    print((len(strs)-1)*9+strs[0])
else:
    print((len(strs)-1)*9+strs[0]-1)
Buggy python submission (verdict: Runtime Error):
c = []
for i in range(3):
    c.append(list(int(x) for x in input().split()))
c[1][0] -= c[0][0]
c[2][0] -= c[0][0]
if c[1][1] == c[0][1] + c[1][0] and c[1][2] == c[0][2] + c[1][0] and c[2][1] == c[0][1] + c[2][0] and c[2][2] == c[0][2] + c[2][0]:
    print(‘Yes’)
else:
    print(‘No’)

Fixed submission:
c = []
for i in range(3):
    c.append(list(int(x) for x in input().split()))
c[1][0] -= c[0][0]
c[2][0] -= c[0][0]
if c[1][1] == c[0][1] + c[1][0] and c[1][2] == c[0][2] + c[1][0] and c[2][1] == c[0][1] + c[2][0] and c[2][2] == c[0][2] + c[2][0]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
ls = []
def onoff(n):
    global ls
    if len(n) == 10:
        ls.append(n)
    else:
        onoff(n + '0')
        onoff(n + '1')
onoff('0')
onoff('1')
del ls[0]
n = int(input())
f = [list(map(str,input().split())) for x in range(n)]
p = [list(map(int,input().split())) for x in range(n)]
ans = -99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
for i in range(1024):
    check = 0
    for j in range(n):
        count = 0
        for k in range(10):
            if ls[i][k] == f[j][k] and ls[i][k] == '1':
                count += 1
        check += p[j][count]
    ans = max(ans,check)
print(ans)

Fixed submission:
ls = []
def onoff(n):
    global ls
    if len(n) == 10:
        ls.append(n)
    else:
        onoff(n + '0')
        onoff(n + '1')
onoff('0')
onoff('1')
del ls[0]
n = int(input())
f = [list(map(str,input().split())) for x in range(n)]
p = [list(map(int,input().split())) for x in range(n)]
ans = -99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
for i in range(1023):
    check = 0
    for j in range(n):
        count = 0
        for k in range(10):
            if ls[i][k] == f[j][k] and ls[i][k] == '1':
                count += 1
        check += p[j][count]
    ans = max(ans,check)
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

Fixed submission:
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
if n == 1:
    print(int(input()))
    sys.exit()
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

Buggy python submission (verdict: Runtime Error):
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
t = [int(input()) for i in range(n)]
check = t[0]*t[1]/gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

Fixed submission:
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
if n == 1:
    print(int(input()))
    sys.exit()
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

Buggy python submission (verdict: Runtime Error):
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
t = [int(input()) for i in range(n)]
check = t[0]*t[1]/gcd(t[0],t[1])
for i in range(n-2):
    check = check*t[i+2]/gcd(check,t[i+2])
print(int(check))

Fixed submission:
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
if n == 1:
    print(int(input()))
    sys.exit()
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))
Buggy python submission (verdict: Runtime Error):
#

array = list(map(int, input().strip().split(' ')))


N =  array[0]

T =  array[1]


#print(N)
#print(T)

if N < 1:
    sys.exit()

if N > 100:
    sys.exit()


if T < 1:
    sys.exit()

if T > 1000:
    sys.exit()



c_min = 9999


for i in range(N):
    array1 = list(map(int, input().strip().split(' ')))
    cN =  array1[0]

    tN =  array1[1]

    if cN < 1:
        sys.exit()

    if cN > 1000:
        sys.exit()

    if tN < 1:
        sys.exit()

    if tN > 1000:
        sys.exit()
    
    if tN <= T:
        if c_min > cN:

            c_min = cN

if c_min == 0:
    print("TLE")

else:
    print(c_min)

    


Fixed submission:
n = int(input())


if n == 1:
    print("Hello World")

elif n == 2:

     a = int(input())
     b = int(input())

     c = a + b
     print(c)

Buggy python submission (verdict: Runtime Error):
#

array = list(map(int, input().strip().split(' ')))


N =  array[0]

T =  array[1]


#print(N)
#print(T)

if N < 1:
    quit()

if N > 100:
    quit()


if T < 1:
    quit()

if T > 1000:
    quit()




c_min = 9999


for i in range(N):
    array1 = list(map(int, input().strip().split(' ')))
    cN =  array1[0]

    tN =  array1[1]

    if cN < 1:
        quit()

    if cN > 1000:
        quit()

    if tN < 1:
        quit()

    if tN > 1000:
        quit()

    if tN <= T:
        if c_min > cN:

            c_min = cN

if c_min == 0:
    print("TLE")

else:
    print(c_min)

    

Fixed submission:
n = int(input())


if n == 1:
    print("Hello World")

elif n == 2:

     a = int(input())
     b = int(input())

     c = a + b
     print(c)
Buggy python submission (verdict: Runtime Error):
a = int(input("")
b = int(input("")
if b%2==0:
        if a>=13:
          print(b)
        elif 6<=a<=12:
          print(b/2)
        elif a<=5:
          print(0)

Fixed submission:
a, b = [int(a) for a in input( ).split()]
if b%2==0:
  if a>=13:
    print(b)
  elif a>=6 and a<=12:
    print(int(b/2))
  elif a<=5:
    print(0)

Buggy python submission (verdict: Runtime Error):
a = int(input(""))
b = int(input(""))
if b % 2==0:
   if a>=13:
          print(b)
   elif 6<=a<=12:
          print(b/2)
   elif a<=5:
          print(0)

Fixed submission:
a, b = [int(a) for a in input( ).split()]
if b%2==0:
  if a>=13:
    print(b)
  elif a>=6 and a<=12:
    print(int(b/2))
  elif a<=5:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

ans = 1
for i in a:
    ans *=i

if ans > (10**18):
    ans = -1
print(ans)


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

ans = 1
for i in a:
    ans *=i
    if ans > (10**18):
        ans = -1
        break
if 0 in a:
    ans = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
h = list(map(int,input().split()))

data = [[0 for i in range(n)] for j in range(n)]

for i in range(m):
    a,b = map(int,input().split())
    data[a-1][b-1],data[b-1][a-1] = 1,1

#print(data)
ans = 0
for i in range(n):
    ca = 1
    for k,j in enumerate(data[i]):
        if j == 1:
            if h[i]<=h[k]:
                ca = 0
    ans += ca

print(ans)

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

data = [0]*n
#print(h)
#print(data)
for i in range(m):
    a,b = map(int,input().split())
    k = max(data[a-1],h[b-1])
    l = max(h[a-1],data[b-1])
    data[a-1],data[b-1] =k,l

ans = 0

#print(data)
for i in range(n):
    if h[i] > data[i]:
        ans += 1

print(ans)

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

n,m = map(int,input().split())
h = list(map(int,input().split()))

data = np.zeros((n,n))

for i in range(m):
    a,b = map(int,input().split())
    data[a-1,b-1],data[b-1,a-1] = 1,1

#print(data)
ans = 0
for i in range(n):
    ca = 1
    for k,j in enumerate(data[i]):
        if j == 1:
            if h[i]<=h[k]:
                ca = 0
    ans += ca

print(ans)


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

data = [0]*n
#print(h)
#print(data)
for i in range(m):
    a,b = map(int,input().split())
    k = max(data[a-1],h[b-1])
    l = max(h[a-1],data[b-1])
    data[a-1],data[b-1] =k,l

ans = 0

#print(data)
for i in range(n):
    if h[i] > data[i]:
        ans += 1

print(ans)

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

n,m = map(int,input().split())
h = list(map(int,input().split()))

data = np.zeros((n,n))

for i in range(m):
    a,b = map(int,input().split())
    data[a-1,b-1],data[b-1,a-1] = 1,1

#print(data)
ans = 0
for i in range(n):
    ca = 1
    for k,j in enumerate(data[i]):
        if j == 1:
            if h[i]<=h[k]:
                ca = 0
                break
    ans += ca

print(ans)


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

data = [0]*n
#print(h)
#print(data)
for i in range(m):
    a,b = map(int,input().split())
    k = max(data[a-1],h[b-1])
    l = max(h[a-1],data[b-1])
    data[a-1],data[b-1] =k,l

ans = 0

#print(data)
for i in range(n):
    if h[i] > data[i]:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import collections
n = int(input())
A = np.array(list(map(int,input().split())))
B = np.array([i+1 for i in range(n)])
C,D = A+B,B-A
x = max(max(C),1)
ans = 0

c = collections.Counter(C)
d = collections.Counter(D)
ans = 0
for i in range(x):
    ans += c[i]*d[i]
print(ans)


Fixed submission:
import numpy as np
import collections
n = int(input())
A = np.array(list(map(int,input().split())))
B = np.array([i+1 for i in range(n)])
C,D = A+B,B-A
ans = 0

c = collections.Counter(C)
d = collections.Counter(D)
ans = 0
for i in c.keys():
    ans += c[i]*d[i]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
A = np.array(list(map(int,input().split())))
B = np.array([i+1 for i in range(n)])
C,D = A+B,B-A
ans = 0
for i in C:
    ans += np.count_nonzero(D==i)
print(ans)


Fixed submission:
import numpy as np
import collections
n = int(input())
A = np.array(list(map(int,input().split())))
B = np.array([i+1 for i in range(n)])
C,D = A+B,B-A
ans = 0

c = collections.Counter(C)
d = collections.Counter(D)
ans = 0
for i in c.keys():
    ans += c[i]*d[i]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int,input().split()))
ans = 0
for  i,a in enumerate(A):
    for j,b in enumerate(A[i+1:]):
        ans += (abs(j+1)==a+b)
print(ans)


Fixed submission:
import numpy as np
import collections
n = int(input())
A = np.array(list(map(int,input().split())))
B = np.array([i+1 for i in range(n)])
C,D = A+B,B-A
ans = 0

c = collections.Counter(C)
d = collections.Counter(D)
ans = 0
for i in c.keys():
    ans += c[i]*d[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
K = int(input())
l = [i for i in range(1,10)]

def func(x):
    y = x%10
    if y == 0:
        return [x*10,x*10+1]
    elif y == 9:
        return [x*10+8,x*10+9]
    else:
        return [x*10+y-1,x*10+y,x*10+y+1]

li1 = l[:]
li2 = []
if K < 10:
    print(K)
else:
    while True:
        for i in li1:
            a = func(i)
            li2.extend(a)
        l.extend(li2)
        if len(l) >=K:
            break
        else:
            li1 = li2[:]
            li2 = []
    print(l[K-1])


Fixed submission:

N,X,Y = map(int,input().split())
l = [0]*N

for i in range(1,N):
    for j in range(i+1,N+1):
        a = min(abs(i-j),abs(X-i)+1+abs(j-Y),abs(Y-i)+1+abs(j-X))
        l[a] += 1

[print(i) for i in l[1:]]
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
t = 1
f = 1
for i in range(q):
    que = input().split()
    if que[0] == "1":
        t *=-1
    else:
        if que[1] == "1":
            f = 1
        else:
            f = -1
        if t*f == 1:
            s = que[2] + s
        else:
            s = s + que[2]

if t == -1:
    s = s[::-1]

print(s)


Fixed submission:
s = input()
q = int(input())
t = 0
f = -1
x = ["",""]
for i in range(q):
    que = input().split()
    if que[0] == "1":
        t += 1
    else:
        x[(int(que[1])-1+t)%2] += que[2]

s = x[0][::-1] + s + x[1]
if t%2 == 1:
    s = s[::-1]

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
t = 1
f = 1
for i in range(q):
    que = input().split()
    if que[0] == "1":
        t *=-1
    else:
        if que[1] == "1":
            f = 1
        else:
            f = -1
        if t*f == 1:
            s = que[2] + s
        else:
            s = s + que[2]

if t == -1:
    s = s[::-1]

print(s)


Fixed submission:
s = input()
q = int(input())
t = 0
f = -1
x = ["",""]
for i in range(q):
    que = input().split()
    if que[0] == "1":
        t += 1
    else:
        x[(int(que[1])-1+t)%2] += que[2]

s = x[0][::-1] + s + x[1]
if t%2 == 1:
    s = s[::-1]

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
t = 1
f = 0
for i in range(q):
    que = input().split()
    if que[0] == "1":
        s = s[::-1]
    else:
        if que[1] == "1":
            s = que[2]+s
        else:
            s = s+que[2]

print(s)


Fixed submission:
s = input()
q = int(input())
t = 0
f = -1
x = ["",""]
for i in range(q):
    que = input().split()
    if que[0] == "1":
        t += 1
    else:
        x[(int(que[1])-1+t)%2] += que[2]

s = x[0][::-1] + s + x[1]
if t%2 == 1:
    s = s[::-1]

print(s)
Buggy python submission (verdict: Time Limit Exceeded):
import math

def combinations_count(n, r):
    return (math.factorial(n) // (math.factorial(n - r) * math.factorial(r)))%(10**9+7)
    
div = 10**9+7
n,a,b = [int(i) for i in input().split()]
ans = 1
for i in range(n):
    ans = (2*ans)%div

print((ans-1- combinations_count(n,a) - combinations_count(n,b))%div)

Fixed submission:
def combinations(n,k,mod):
    x,y = 1,1
    for i in range(k):
        x = (x*(n-i))%mod
        y = (y*(i+1))%mod
    return (x*pow(y,mod-2,mod))%mod
    

div = 10**9+7
n,a,b = map(int,input().split())

cn = pow(2,n,div)-1
ca = combinations(n,a,div)
cb = combinations(n,b,div)

print((cn-ca-cb)%div)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = [int(i) for i in input().split()]
p = [int(i) for i in input().split()]
data = []
for j in range(N-K+1):
    data.append(sum([p[-i] for i in range(j,K+j)]))

print((max(data)+K)/2)

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

s = sum([p[i] for i in range(K)])
data = [s]
for i in range(N-K):
    s = s-p[i]+p[i+K]
    data.append(s)
print((max(data)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
def E(x):
    return (x+1)/2

N,K = [int(i) for i in input().split()]
p = [int(i) for i in input().split()]

print(max([sum([E(p[-i]) for i in range(j,K+j)]) for j in range(N-K+1)]))

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

s = sum([p[i] for i in range(K)])
data = [s]
for i in range(N-K):
    s = s-p[i]+p[i+K]
    data.append(s)
print((max(data)+K)/2)
Buggy python submission (verdict: Runtime Error):
from fracrions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
d = [int(i) for i in input().split()]
 
print(lcm(d[0],d[1]))



Fixed submission:
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
d = [int(i) for i in input().split()]
 
print(lcm(d[0],d[1]))

Buggy python submission (verdict: Runtime Error):
from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

d = [int(i) for i in input().split()]

print(lcm(d[0],d[1]))


Fixed submission:
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
d = [int(i) for i in input().split()]
 
print(lcm(d[0],d[1]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
data = set()

for i in range(N-2):
  x = S[i]
  for j in range(i+1,N-1):
    y = S[j]
    for k in range(j+1,N):
      z = S[k]
      data.add(x+y+z)
print(len(data))

Fixed submission:
N = int(input())
S = input()
data = set()
xd,yd = set(),set()
for i in range(N-2):
  x = S[i]
  if x in xd:
    continue
  else:
    xd.add(x)
    yd = set()
  for j in range(i+1,N-1):
    y = S[j]
    if y in yd:
      continue
    else:
      yd.add(y)
    for k in range(j+1,N):
      z = S[k]
      data.add(x+y+z)
print(len(data))
Buggy python submission (verdict: Runtime Error):
a,b = [int(i) for i in input().split]

if(a>9 or b>9):
    print(-1)
else:
    print(a*b)

Fixed submission:
a,b = [int(i) for i in input().split()]

if(a>9 or b>9):
    print(-1)
else:
    print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
import math
data = 1000000000000
N = int(input())
for i in range(int(math.sqrt(N))+1):
    for j in range(N+1):
        if i*j == N:
            if data >i+j-2:
                data = i+j-2

print(data)

Fixed submission:
import math
data = 1000000000000
N = int(input())
for i in range(1,int(math.sqrt(N))+1):
    j = N/i
    if j-int(j) == 0:
        if data >i+int(j)-2:
            data = i+int(j)-2

print(data)
Buggy python submission (verdict: Runtime Error):
N,K=[int(i) for i in input().split()]
h = [int(i) for i in input().split()]
smy = 0

for i in h:
  if !(h<K):
    smy+=1:
print(smy)

Fixed submission:
N,K=[int(i) for i in input().split()]
h = [int(i) for i in input().split()]
smy = 0
 
for i in h:
  if not(i<K):
    smy+=1
print(smy)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(i)-1 for i in input().split()]

for i in range(N):
  print(a.index(i)+1,end=" ")

Fixed submission:
N = int(input())
dic = {}
a = [int(i) for i in input().split()]

for i in range(N):
    dic.setdefault(a[i], i+1)
    
dic = sorted(dic.items(), key=lambda x:x[0])

for i in range(N):
    print(dic[i][1], end=" ")
Buggy python submission (verdict: Time Limit Exceeded):
N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]
data.sort(reverse = True)
#print(data)
while M != 0:
    x = max(data)
    data[data.index(x)] //= 2
    M -= 1
    #print(data)

print(sum(data))

Fixed submission:
import heapq


N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]
data = list(map(lambda x: x*(-1), data))
heapq.heapify(data)
#print(data)
while M != 0:
    x = heapq.heappop(data)*(-1)
    heapq.heappush(data,-1*(x//2))
    M -= 1
    #print(data)
 
print(-sum(data))

Buggy python submission (verdict: Runtime Error):
N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]


for i in range(M):
    data[data.index(max(data))] /= 2

for i in range(M):
    data[i] = data[i]//1


print(int(sum(data)))

Fixed submission:
import heapq


N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]
data = list(map(lambda x: x*(-1), data))
heapq.heapify(data)
#print(data)
while M != 0:
    x = heapq.heappop(data)*(-1)
    heapq.heappush(data,-1*(x//2))
    M -= 1
    #print(data)
 
print(-sum(data))