Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02659 (python)

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


def solve(a, b):
    return a * (b * 100 + c) // 100


print(solve(a, b))

Buggy submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b = int(100 * int(b.split('.')))


def solve(a, b):
    return a * b // 100


print(solve(a, b))
Problem p02707 (python)

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

res = [0] * N
for a in As:
    res[a-1] += 1
for r in res:
    print(r)

Buggy submission (verdict: Runtime Error):
N = int(input())
As = np.array(list(map(int, input().split())))

res = [0] * N
for a in As:
    res[a-1] += 1
for r in res:
    print(r)
Problem p02912 (python)

Fixed submission:
N, M = map(int, input().split())
mvals = list(map(lambda x: -int(x), input().split()))

import heapq
heapq.heapify(mvals)

for _ in range(M):
    price = heapq.heappop(mvals)
    heapq.heappush(mvals, price / 2)

res = sum(map(lambda x:int(-x), mvals))
print(res)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
As = list(map(int, input().split()))

mvals = list(np.array(As) * (-1))
import heapq
heapq.heapify(mvals)

for _ in range(M):
    price = heapq.heappop(mvals)
    heapq.heappush(mvals, price / 2)

res = (np.array(mvals) * (-1)).astype(int).sum()
print(res)
Problem p03805 (python)

Fixed submission:
from itertools import permutations
import numpy as np
N, M = map(int, input().split(" "))#N頂点M辺
edges = []
for _ in range(M):
    edges += [list(map(int, input().split(" ")))]

count = 0
for line in permutations(np.arange(N - 1) + 2):
    vtxs = [1] + list(line)
    for i in range(N - 1):
        edge = sorted([vtxs[i], vtxs[i + 1]])
        if edge not in edges:
            break
    else:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
from itertools import permutations
import numpy as np
N, M = map(int, input().split(" "))#N頂点M辺
mat = [[0] * n for _ in range(n)]
for _ in range(M):
    v1, v2 = map(int, input().split(" "))
    mat[v1 - 1][v2 - 1] = mat[v2 - 1][v1 - 1] = 1

count = 0
for line in permutations(np.arange(N - 1) + 2):
    vtxs = [1] + list(line)
    for i in range(N - 1):
        v1, v2 = vtxs[i], vtxs[i + 1]
        if mat[v1 - 1][v2 - 1] == 0:
            break
    else:
        count += 1
print(count)
Problem p02729 (python)

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

ans = 0

ans += n*(n-1)/2
ans += m*(m-1)/2

print(int(ans))

Buggy submission (verdict: Runtime Error):
import sys

n = int(sys.stdin.readline())
 
li = list(map(int, sys.stdin.readline().split()))
 
ans = [0]*n
for i in range(n):
    li2 = li.copy()
    del li2[i]
    for j in range(n-1):
        for k in range(j+1, n-1):
            if li2[j] == li2[k]:
                ans[i] += 1
for l in range(len(ans)):
    print(ans[l])
Problem p02753 (python)

Fixed submission:
S = input()
 
if S == "AAA":
    print("No")
elif S == "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()
 
if S = "AAA":
    print("No")
elif S = "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()

if S = "AAA":
  print("No")
elif S = "BBB":
  print("No")
else:
  print("Yes")
Problem p03107 (python)

Fixed submission:
cube = input()

zero_count = 0
one_count = 0

for i in range(len(cube)):
    if cube[i] == '0':
        zero_count += 1
    else:
        one_count += 1

if zero_count < one_count:
    print(zero_count * 2)
else:
    print(one_count * 2)

Buggy submission (verdict: Runtime Error):
cubes = input()

removed_cubes_count = 0

while True:
    count01 = cubes.count('01')
    count10 = cubes.count('10')

    if count01 == 0 and count10 == 0:
        break

    removed_cubes_count += count01 + count10

    cube = cube.translate({
        '01': '',
        '10': ''
    })

print(removed_cubes_count)
Problem p03208 (python)

Fixed submission:
trees_num, illuminations_num = map(int, input().split())
trees = sorted(int(input()) for _ in range(trees_num))

diffs = []

for i in range(trees_num - illuminations_num + 1):
    diffs.append(trees[i+illuminations_num-1] - trees[i])

print(min(diffs))

Buggy submission (verdict: Runtime Error):
trees_num, illuminations_num = map(int, input().split())
trees = sorted(int(input()) for _ in range(trees_num))

diffs = []

for i in range(trees_num - illuminations_num + 1):
    h_max = max(trees[i:illuminations_num+1])
    h_min = min(trees[i:illuminations_num+1])

    diffs.append(h_max - h_min)

print(min(diffs))
Problem p02915 (python)

Fixed submission:
n = int(input())
print(n * n * n)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
ans = 0

for i in range(n - 1):
    if s[i] == s[i + 1] :
        ans += 1
print(min(n-1, ans + 2 * k))
Problem p03075 (python)

Fixed submission:
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

coord = [a, b, c, d, e]
flag = False
for i in range(len(coord)):
    for j in range(len(coord)):
        dis = abs(coord[i] - coord[j])
        if dis > k :
            flag = True
if flag == True :
    print(":(")
else :
    print("Yay!")

Buggy submission (verdict: Runtime Error):
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

coord = [a, b, c, d, e]
for i in range(len(coord)):
    for j in range(len(coord)):
        if abs(coord[i] - coord[j]) > k :
            print(":(")
            sys.exit(1)
print("Yay!")
Problem p03307 (python)

Fixed submission:
N = int(input())
#最大公約数
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

#最小公倍数
def lcm(a,b):
    return a*b//gcd(a,b)

print(lcm(2,N))

Buggy submission (verdict: Runtime Error):
import math
N = int(input())

if N % 2 == 0 :
    print(N)
else :
    print((2 * N) // math.gcd(2, N))
Problem p03315 (python)

Fixed submission:
from sys import stdin

a = stdin.readline().rstrip()
a_list = list(a)

count = 0
for i in a_list:
    if i == '+' :
        count = count + 1
    if i == '-' :
        count = count - 1
print(count)

Buggy submission (verdict: Runtime Error):
from sys import stdin



n_s, k_s = stdin.readline().rstrip().split() # 問題文に出てくるA，B，Cが空白区切りで1行で入力される場合はアンパック代入が便利
a_s_l = stdin.readline().rstrip().split() # 問題文に出てくるA，B，Cが空白区切りで1行で入力される場合はアンパック代入が便利

N = int(n_s)
K = int(k_s)
#A = []
"""
for i in a_s_l:
    A.append(int(i))
"""
A = list(map(int, a_s_l))
#AA = A
count = 0
j = K - 1
for i, a in enumerate(A):
    if N == K :
        count = count + 1
        break
    elif i > N - K:
        #buf = A[N - K : N]
        count = count + 1
    elif j== i :
        #buf = A[i : i + K]
        count = count + 1
        j = i + K - 1
    
print(count)
Problem p03774 (python)

Fixed submission:
N, M = map(int, input().split())
stu_li = [list(map(int, input().split())) for i in range(N)]
chk_li = [list(map(int, input().split())) for i in range(M)]

min_dist = 10 ** 10
min_num = M
for i in range(N) :
    for j in range(M) :
        dist = abs(stu_li[i][0] - chk_li[j][0]) + abs(stu_li[i][1] - chk_li[j][1])
        if dist < min_dist : 
            min_dist = dist
            min_num = j
    print(min_num + 1)
    min_dist = 10 ** 10
    min_num = M

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
stu_li = [list(map(int, input().split())) for i in range(N)]
chk_li = [list(map(int, input().split())) for i in range(M)]

import math
min_dist = math.inf
min_num = M
for i in range(N) :
    for j in range(M) :
        dist = abs(stu_li[i][0] - chk_li[j][0]) + abs(stu_li[i][1] - chk_li[j][1])
        if dist < min_dist : 
            min_dist = dist
            min_num = j
    print(min_num + 1)
    min_dist = math.inf
    min_num = M
Problem p02701 (python)

Fixed submission:
N = int(input())
list_S = [str(input()) for i in range(N)]
print(len(list(set(list_S))))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  if not str(input()) in list_S: list_S.append(str(input()))
print(len(list_S))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  if not str(input()) in list_get: list_S.append(str(input()))
print(len(list_S))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  if not str(input()) in list_get: list_S.append(str(input()))
print(len(list_get))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  list_S.append(str(input()))

list_get = []
for i in range(list_S):
  if not list_S[i] in list_get:
    list_get.append(list_S[i])

print(len(list_get))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  list_S.append(str(input()))

list_get = []
for i in range(list_S):
  if not list_S[i] in list_get: list_get.append(list_S[i])

print(len(list_get))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  list_S.append(str(input()))

list_get = []
for i in list_S:
  if not list_S[i] in list_get: list_get.append(list_S[i])

print(len(list_get))

Buggy submission (verdict: Runtime Error):
N = int(input())
list_S = []
for i in range(N):
  list_S.append(input())

list_get = []
for i in list_S:
  if not list_S[i] in list_get: list_get.append(list_S[i])

print(len(list_get))
Problem p02970 (python)

Fixed submission:
import math
N, D = map(int, input().split())
print(math.ceil(N/(2*D+1)))

Buggy submission (verdict: Runtime Error):
N, D = map(int, input().split())
print(math.ceil(N/(2*D+1)))
Problem p03013 (python)

Fixed submission:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    N, M = map(int, input().split())
    A = [0] * (N + 1)
    for i in range(M):
        bre = int(input())
        A[bre] = -1
    A[0] = 1
    A[1] = 1 if A[1] != -1 else -1
    # print(A)
    for i in range(N):
        if (A[i] == -1) & (A[i + 1] == -1):
            print(0)
            sys.exit()

    for i in range(2, N + 1):
        if A[i] == -1:
            continue
        elif A[i - 1] == -1:
            A[i] = A[i - 2]
        elif A[i - 2] == -1:
            A[i] = A[i - 1]
        else:
            A[i] = A[i - 1] + A[i - 2]
    print(A[N] % 1000000007)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    N, M = map(int, input().split())
    A = [0] * (N + 1)
    for i in range(M):
        bre = int(input())
        A[bre] = -1
    a_2 = 1
    a_1 = 1 if A[1] != -1 else -1
    # print(A)
    for i in range(N):
        if (A[i] == -1) & (A[i + 1] == -1):
            print(0)
            sys.exit()
    # print(a_1, a_2)
    A[0] = 1
    A[1] = 1 if A[1] != -1 else -1
    for i in range(2, N + 1):
        if A[i] == -1:
            a_2 = a_1
            a_1 = -1
            continue
        elif a_1 == -1:
            a = a_2
        elif a_2 == -1:
            a = a_1
        else:
            a = a_1 +a_2
        a_2 = a_1
        a_1 = a
        # print(a_2, a_1)
    print(a % 1000000007)

if __name__ == '__main__':
    main()
Problem p02881 (python)

Fixed submission:
import math
n = int(input())
m = int(math.sqrt(n))
for i in reversed(range(1, m+1)):
  if n % i == 0:
    j =  n // i
    print(i+j-2)
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
m = int(sqrt(m))
for i in reversed(range(1, m)):
  if N % i == 0:
    j =  N // i
    print(i+j-2)
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
m = int(sqrt(m))
for i in reversed(range(1, m)):
  if N%i==0:
    j = N//i
    print(i+j-2)
Problem p03835 (python)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0 <= z <=k:
            count = count +1
print(count)

Buggy submission (verdict: Runtime Error):
k, s = map(int, input().split())
count = 0
for x in range(k+1):
  for y in range(k+1):
    z = s-x-y
      if 0 <= z <=k:
        count = count +1
print(count)
Problem p02685 (python)

Fixed submission:
n, m, k = map(int, input().split())
 
mod = 998244353
 
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
 
N = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
 
for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
 
ans = 0
for i in range(k+1):
    col = m * pow(m-1,n-i-1,mod)
    match = cmb(n-1,i,mod)
    ans += col * match
 
print(ans % mod)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())

mod = 998244353

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

N = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ans = 0
for i in range(k+1):
    col = m * pow(m-1,n-i-1,mod)
    match = cmb(n-1,i,mod)
    ans += col * match

print(ans % mod)
Problem p02759 (python)

Fixed submission:
a = int(input())

if a % 2 == 0:
    b = a/2

else:
    b = (a+1)/2

print(int(b))

Buggy submission (verdict: Runtime Error):
from collections import deque

n, m, k = map(int, input().split())

friends = [[0] * n for _ in range(n)]

blocks = [[0] * n for _ in range(n)]

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

for i in range(k):
    c, d = map(int, input().split())
    blocks[c-1][d-1] = 1
    blocks[d-1][c-1] = 1

for i in range(n):
    q = deque()
    q.append(i)
    cnt = [-1] * n
    cnt[i] = 0
    total = 0
    while q:
        k = q.popleft()
        for j in range(n):
            if friends[k][j] and cnt[j] == -1:
                q.append(j)
                cnt[j] = cnt[k] + 1
                if cnt[j] > 1 and not blocks[i][j]:
                    total += 1
    print(total)
Problem p02793 (python)

Fixed submission:
def main():
    import fractions
    n = int(input())
    array = list(map(int, input().split()))
    lcm = array[0]
    for i in range(1, n):
        lcm = lcm * array[i] // fractions.gcd(lcm, array[i])

    total = 0
    for i,num in enumerate(array):
        total += lcm // num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    import fractions
    n = int(input())
    array = list(map(int, input().split()))
    lcm = array[0]
    for i in range(1, n):
        lcm = lcm * array[i] // fractions.gcd(lcm, array[i])

    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#２つでの再酥油公倍数
def lcm_base(x, y):
    from fractions import gcd
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    from functools import reduce
    return reduce(lcm_base, numbers, 1)


def main():
    n = int(input())
    array = list(map(int, input().split()))
    lcm = lcm_list(array)

    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from fractions import gcd # for python3.4 or lower
from functools import reduce
 
#２つでの再酥油公倍数
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
 
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
 
def main():
    n = int(input())
    array = list(map(int, input().split()))
    lcm = lcm_list(array)
 
    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))
 
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#２つでの再酥油公倍数
def lcm_base(x, y):
    import math
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    from functools import reduce
    return reduce(lcm_base, numbers, 1)


def main():
    n = int(input())
    array = list(map(int, input().split()))
    lcm = lcm_list(array)

    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()

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

#２つでの再酥油公倍数
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

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


def main():
    n = int(input())
    array = list(map(int, input().split()))
    lcm = lcm_list(array)

    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()
Problem p03053 (python)

Fixed submission:
from subprocess import call
call (('pypy3', '-c', """
from collections import deque
 
def main():
    h, w = map(int, input().split())
    A = [list(input()) for _ in range(h)]
    d = [[10**9] * w for _ in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append([i, j])
               d[i][j] = 0
           else:
               d[i][j] = 10 ** 9
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and d[nx][ny] == 10**9:
                d[nx][ny] = d[x][y] + 1
                que.append([nx, ny])
    ans = 0
    for i in range(h):
        for j in range(w):
            ans = max(ans, d[i][j])
    print(ans)
    
    return
    
main()
 
"""))

Buggy submission (verdict: Runtime Error):
from collections import deque
 
def main():
    h, w = map(int, input().split())
    maze= [list(input()) for i in range(h)]
    route = [[-1] * w for i in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if maze[i][j] == "#":
               que.append([i, j])
               route[i][j] = 0
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and route[nx][ny] == -1:
                route[nx][ny] = route[x][y] + 1
                que.append([nx, ny])

    ans = 0
    for i in range(h):
        for j in range(w):
            ans = max(ans, d[i][j])
    print(ans)

    return

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from collections import deque
 
def main():
    h, w = map(int, input().split())
    maze= [list(input()) for i in range(h)]
    route = [[-1] * w for i in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append([i, j])
               route[i][j] = 0
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and route[nx][ny] == -1:
                route[nx][ny] = route[x][y] + 1
                que.append([nx, ny])
                ans = max(ans , route[nx][ny])
#    ans = 0
#    for i in range(h):
#        for j in range(w):
#            ans = max(ans, d[i][j])
#    print(ans)
    
    return

if __name__ == '__main__':
    main()
Problem p02688 (python)

Fixed submission:
import sys

n,k = (int(i) for i in input().split())

d = [None]*k
a = [None]*k

syugou = []
for i in range(k):
    d[i] = int(input())
    a[i] = [int(j) for j in input().split()]

    syugou = syugou+a[i]

num = set(syugou)

print(n-len(num))

Buggy submission (verdict: Runtime Error):
import sys

n,k = (int(i) for i in input().split())

d = [None]*k
a = [None]*n

syugou = []
for i in range(k):
    d[i] = int(input())
    a[i] = [int(j) for j in input().split()]

    syugou = syugou+a[i]

num = set(syugou)

print(n-len(num))

Buggy submission (verdict: Runtime Error):
import sys

n,k = (int(i) for i in input().split())

d = [None]*k
a = [None]*n

syugou = []
for i in range(k):
    d[i] = int(input())
    a[i] = [int(j) for j in input().split()]

    syugou = syugou+a[i]
    ans = set(syugou)

num = list(ans)

print(n-len(num))
Problem p02699 (python)

Fixed submission:

import sys
     
s,w =(int(n) for n in input().split())
     
if (s <= w):
        print("unsafe")
        sys.exit()
else:
        print("safe")

Buggy submission (verdict: Runtime Error):
    import sys
     
    s,w =(int(n) for n in input().split())
     
    if (s <= w):
        print("unsafe")
        sys.exit()
    else:
        print("safe")
Problem p02831 (python)

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


def gcd(A, B):
    a = A
    b = B
    while b != 0:
        a, b = b, a % b
    return a


print(A * B // gcd(A, B))

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

print(int(A * B / math.gcd(A, B)))
Problem p02879 (python)

Fixed submission:
a, b = map(int, input().split())
if a <= 9 and b <= 9:
  print(a*b)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a <= 9 and b <= 9:
  return a * b
else:
  return -1
Problem p02880 (python)

Fixed submission:
a = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == a:
            print("Yes")
            exit()
print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
if a <= 81:
    for i in range(8):
        if ((a % (i+2)) == 0) and ((a / (i+2)) <= 9):
            print("Yes")
            b = False

if b:
    print("No")
Problem p02831 (python)

Fixed submission:
#ABC148.C
import fractions
A,B = map(int,input().split())
def lcm(x,y):
    return x*y//fractions.gcd(x,y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
#ABC148.C
import math
A,B = map(int,input().split())
def lcm(x,y):
    return x*y//math.gcd(x,y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
#ABC148.C
A,B = map(int,input().split())
import math
def lcm(x,y):
    return x*y//math.gcd(x,y)
print(lcm(A,B))