Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def isBingo(a):
    for i in range(3)
        if a[i][0] == a[i][1] and a[i][0] == a[i][2]:
            return 'Yes'
        elif a[0][i] == a[1][i] and a[i][0] == a[2][i]:
            return 'Yes'
    if a[0][0] == a[1][1] and a[0][0] == a[2][2]:
        return 'Yes'
    elif a[0][2] == a[1][1] and a[0][2] == a[2][0]:
        return 'Yes'
    else:
        return 'No'
    
a = []
for i in range(3):
    a.append(list(map(int, input().split())))
n = int(input())
b = []
for i in range(n):
    b.append(int(input()))

for i in range(n):
    for j in range(3):
        if b[i] in a[j]:
            a[j][a[j].index(b[i])] = -1

print(isBingo(a))

Fixed submission:
def isBingo(a):
    for i in range(3):
        if a[i][0] == a[i][1] and a[i][0] == a[i][2] and a[i][0] == -1:
            return 'Yes'
        elif a[0][i] == a[1][i] and a[0][i] == a[2][i] and a[0][i] == -1:
            return 'Yes'
    if a[0][0] == a[1][1] and a[0][0] == a[2][2] and a[0][0] == -1:
        return 'Yes'
    elif a[0][2] == a[1][1] and a[0][2] == a[2][0] and a[0][2] == -1:
        return 'Yes'
    else:
        return 'No'
    
a = []
for i in range(3):
    a.append(list(map(int, input().split())))
n = int(input())
b = []
for i in range(n):
    b.append(int(input()))

for i in range(n):
    for j in range(3):
        if b[i] in a[j]:
            a[j][a[j].index(b[i])] = -1

print(isBingo(a))

Buggy python submission (verdict: Runtime Error):
def isBingo(a):
    for i in range(3)
        if a[i][0] == a[i][1] and a[i][0] == a[i][2]:
            return 'Yes'
        elif a[0][i] == a[1][i] and a[i][0] == a[2][i]:
            return 'Yes'
    if a[0][0] == a[1][1] and a[0][0] == a[2][2]:
        return 'Yes'
    elif a[0][2] == a[1][1] and a[0][2] == a[2][0]
        return 'Yes'
    else:
        return 'No'
    
a = []
for i in range(3):
    a.append(list(map(int, input().split())))
n = int(input())
b = []
for i in range(n):
    b.append(int(input()))

for i in range(n):
    for j in range(3):
        if b[i] in a[j]:
            a[j][a[j].index(b[i])] = -1

print(isBingo(a))

Fixed submission:
def isBingo(a):
    for i in range(3):
        if a[i][0] == a[i][1] and a[i][0] == a[i][2] and a[i][0] == -1:
            return 'Yes'
        elif a[0][i] == a[1][i] and a[0][i] == a[2][i] and a[0][i] == -1:
            return 'Yes'
    if a[0][0] == a[1][1] and a[0][0] == a[2][2] and a[0][0] == -1:
        return 'Yes'
    elif a[0][2] == a[1][1] and a[0][2] == a[2][0] and a[0][2] == -1:
        return 'Yes'
    else:
        return 'No'
    
a = []
for i in range(3):
    a.append(list(map(int, input().split())))
n = int(input())
b = []
for i in range(n):
    b.append(int(input()))

for i in range(n):
    for j in range(3):
        if b[i] in a[j]:
            a[j][a[j].index(b[i])] = -1

print(isBingo(a))
Buggy python submission (verdict: Runtime Error):
s = input()
if len(S) % 2 == 1:
  print('No')
else:
  if s[0:(len(s)-1)/2] == s[(len(s)-1)/2+1:len(s)-1]:
    print('Yes')
  else:
    print('No')

Fixed submission:
n = int(input())
s = input()
if n % 2 == 1:
  print('No')
else:
  if s[0:n//2] == s[n//2:n]:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = list(map(int, input().split()))
isYes = True
for i in range(n-1):
    if h[i] - min(h[i+1:]) >= 2:
        isYes = False
        break
if isYes:
    print('Yes')
else:
    print('No')

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
isYes = True
tmpmin = 10**9+1
for i in range(1, n):
    if h[n-i] <= tmpmin:
        tmpmin = h[n-i]
    if h[n-(i+1)]-h[n-i]>= 2 or h[n-(i+1)]-tmpmin >= 2:
        isYes = False
        break
if isYes:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
L, R = map(int, input().split())
if abs(L-R)>2019:
    print(0)
else:
    for i in range(L, R):
        for j in range(i+1, R+1):
            ans = min(ans, i*j%2019)
    print(ans)

Fixed submission:
L, R = map(int, input().split())

if abs(L-R)>2019:
    print(0)
else:
    ans = 2019
    for i in range(L, R):
        for j in range(i+1, R+1):
            ans = min(ans, i*j%2019)
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int, input().split())
ans = 2019
for i in range(L, R):
    for j in range(i+1, R+1):
        ans = min(ans, i*j%2019)
print(ans)

Fixed submission:
L, R = map(int, input().split())

if abs(L-R)>2019:
    print(0)
else:
    ans = 2019
    for i in range(L, R):
        for j in range(i+1, R+1):
            ans = min(ans, i*j%2019)
    print(ans)
Buggy python submission (verdict: Runtime Error):
#C - Stones
n = int(input())
s = list(input())
isFound = False
cnt = 0
right = 0
#一番右の白を見つける
for i in range(n):
    if s[i] == '.':
        right = max(right, i)
#rightまでの黒を数える
for i in range(right+1):
    if s[i] == '#':
        cnt += 1
print(min(s.count('.'), s.count('#'), cnt))

Fixed submission:
#A - On the Way
a, b, c = map(int, input().split())
if (a<c and c<b) or (a>c and c>b):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
# B - ATCoder
s = input()
wordList = 'ACGT'
t = []
tmp = []
for i in range(len(s)):
    if s[i] in wordList:
        tmp.append(s[i])
    if not (s[i] in wordList):
        t.append(tmp)
        tmp = []
print(max(len(i) for i in t))


Fixed submission:
s = input()
wordList = 'ACGT'
t = []
tmp = []
lead = 0
ans = 0
slist = list(s)
for i in range(len(slist)):
    if not slist[i] in wordList:
        ans = max(ans, (i - lead))
        lead = i + 1
ans = max(ans, (len(slist) - lead))
print(ans)
Buggy python submission (verdict: Runtime Error):
#C - Energy Drink Collector
n,m = map(int,input().split())
ab = []
for i in range(n):
    ab.append(list(map(int, input().split())))
abSorted = sorted(ab)
sumB = 0
sumMoney = 0
while sumB + abSorted[i][1] < m:
    sumB += abSorted[i][1]
    sumMoney += abSorted[i][0] * abSorted[i][1]
sumMoney += sbSorted[i][0] * (m - sumB)
print(sumMoney)


Fixed submission:
#C - Energy Drink Collector
n,m = map(int,input().split())
ab = []
for i in range(n):
    ab.append(list(map(int, input().split())))
abSorted = sorted(ab)
sumB = 0
sumMoney = 0
i = 0
while sumB + abSorted[i][1] < m:
    sumB += abSorted[i][1]
    sumMoney += abSorted[i][0] * abSorted[i][1]
    i += 1
sumMoney += abSorted[i][0] * (m - sumB)
print(sumMoney)
Buggy python submission (verdict: Runtime Error):
###B - Foods Loved by Everyone
N, M = map(int, input().split())
kaito = []
for i in range(N):
    kaito.append([int(i) for i in input().split()])

cnt = 0
for i in range(1, M+1):
    jlist = []
    for j in range(N):
        if i in kaito[j][1:]:
            jlist.append(True)
        else:
            jlist.append(False)
    if all(jlist):
        cnt += 1
        
print(cnt)

Fixed submission:
###A - B +/- A
A, B = map(int, input().split())
if B % A == 0:
    print(int(A+B))
else:
    print(int(B-A))
Buggy python submission (verdict: Time Limit Exceeded):
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))

while(len(set(A)) != 1):
    for i in range(N):
        minA  = min(A)
        if A[i] > minA:
            time = A[i] // minA
            if time == 1:
                A[i] =A[i] -  time * minA
            else:
                A[i] =A[i] -  (time - 1) * minA
                
print(min(A))

Fixed submission:
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))

while(len(set(A)) != 1):
    minA  = min(A)
    for i in range(N):
        if A[i] > minA:
            time = A[i] // minA
            if time == 1:
                A[i] =A[i] -  time * minA
            else:
                A[i] =A[i] -  (time - 1) * minA
                
print(min(A))

Buggy python submission (verdict: Time Limit Exceeded):
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))
jlist=[True]
cnt = 0
while(min(A) !=1 and len(set(A)) != 1):
    cnt = 0
    for i in range(N):
        if A[i] - min(A) > 0:
            A[i] = A[i] - min(A)
print(min(A))

Fixed submission:
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))

while(len(set(A)) != 1):
    minA  = min(A)
    for i in range(N):
        if A[i] > minA:
            time = A[i] // minA
            if time == 1:
                A[i] =A[i] -  time * minA
            else:
                A[i] =A[i] -  (time - 1) * minA
                
print(min(A))

Buggy python submission (verdict: Runtime Error):
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))
jlist=[True]
cnt = 0
while(min(A) !=1 and len(set(A)) != 1):
    cnt = 0
    for i in range(N):
        if A[i] - min(A) > 0:
            A[i] = A[i] - min(A)
        print(A)
print(min(A))

Fixed submission:
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))

while(len(set(A)) != 1):
    minA  = min(A)
    for i in range(N):
        if A[i] > minA:
            time = A[i] // minA
            if time == 1:
                A[i] =A[i] -  time * minA
            else:
                A[i] =A[i] -  (time - 1) * minA
                
print(min(A))

Buggy python submission (verdict: Time Limit Exceeded):
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))
jlist=[True]
while(any(jlist) and len(set(A)) != 1):
    for i in range(N):
        if A[i] - min(A) > 0:
            A[i] = A[i] - min(A)
            jlist.append(False)
        else:
            jlist.append(True)
print(min(A))


Fixed submission:
###C - Monsters Battle Royale
N = int(input())
A = list(map(int, input().split()))

while(len(set(A)) != 1):
    minA  = min(A)
    for i in range(N):
        if A[i] > minA:
            time = A[i] // minA
            if time == 1:
                A[i] =A[i] -  time * minA
            else:
                A[i] =A[i] -  (time - 1) * minA
                
print(min(A))
Buggy python submission (verdict: Runtime Error):
import numpy as np
#数値型を分割して取り出し
A, V = map(int, input().split())
B, W = map(int, input().split())
#数値型の取り出し
T = int(input())
AA = A
BB = B
u = np.array([i for i in range(1,T)])
#print(u)

ans = "NO"
for i in u:
  if BB >= AA:
    AA += V
    BB += W
  else:
    AA -= V
    BB -= W
  if AA == BB:
    ans = "YES"
    break
print(ans)

Fixed submission:
#文字型の取り出し
s = input()

print(s[:3])

Buggy python submission (verdict: Runtime Error):
#数値型を分割して取り出し
A, V = map(int, input().split())
B, W = map(int, input().split())
#数値型の取り出し
T = int(input())
AA = A
BB = B
ans = "NO"
for i in range(1,T+1):
  AA = AA + V
  BB = BB + W
  if AA == BB:
    ans = "YES"
    break
print(ans)

Fixed submission:
#文字型の取り出し
s = input()

print(s[:3])
Buggy python submission (verdict: Runtime Error):
TaHP,TaAP,AoHP,AoAP = map(int, input().split())

Flag_Ta = True

while( TaHP > 0 or AoHP > 0):
	if	Flag_Ta:
		AoHP = AoHP - TaAP
		Flag_Ta = False
	else:
		TaHP = TaHP - AoAP
		Flag_Ta = True
if TaHP > 0:
	print("Yes")
else:
    print("No")


Fixed submission:
s, w = map(int, input().split())
if w >= s:
  print ("unsafe")
else:
  print ("safe")
Buggy python submission (verdict: Runtime Error):
a = input().split(' ')
b = (a[0] * a[0]-1)/2 + (a[1] * a[1]-1)/2
print (b)

Fixed submission:
a = input().split(' ')
b = (int(a[0]) * (int(a[0])-1))/2 + (int(a[1]) * (int(a[1])-1))/2
print(int(b))
Buggy python submission (verdict: Runtime Error):
from functools import reduce

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

limit = pow(10, 18)

ans = 1.0
for e in nums:
    ans *= e

if ans >= limit:
    ans = -1

print(int(ans))


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

limit = pow(10, 18)

ans = 1

if 0 in nums:
    ans = 0
else:
    for e in nums:
        if ans > limit / e:
            ans = -1
            break
        else:
            ans *= e

if ans > limit:
    ans = -1

print(int(ans))
Buggy python submission (verdict: Runtime Error):
keys = input.split()
values = tuple(map(int, input().split()))

ball = dict(zip(keys, values))
u = input()

ball[u] -= 1
print(ball[keys[0]], ball[keys[1]])


Fixed submission:
keys = input().split()
values = tuple(map(int, input().split()))

ball = dict(zip(keys, values))
u = input()

ball[u] -= 1
print(ball[keys[0]], ball[keys[1]])
Buggy python submission (verdict: Runtime Error):
from math import gcd

a, b = tuple(map(int, input().split()))
print(int(a * b / gcd(a, b)))


Fixed submission:
from fractions import gcd

a, b = tuple(map(int, input().split()))
print(int(a * b / gcd(a, b)))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

print("win" if sum((a, b, c)) < 21 else "bust")
a, b, c = map(int, input().split())

print("win" if sum((a, b, c)) < 22 else "bust")


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

print("win" if sum((a, b, c)) < 22 else "bust")
Buggy python submission (verdict: Runtime Error):
N, M, X, Y = tuple(map(int, input().split()))
area_X = [int(x) for x in inut().split()]
area_Y = [int(x) for x in inut().split()]
area_X.append(X)
area_Y.append(Y)

print('No War' if max(area_X) < min(area_Y) else 'War')


Fixed submission:
N, M, X, Y = tuple(map(int, input().split()))
area_X = [int(x) for x in input().split()]
area_Y = [int(x) for x in input().split()]
area_X.append(X)
area_Y.append(Y)

print('No War' if max(area_X) < min(area_Y) else 'War')

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

N, M, X, Y = tuple(map(int, input().split()))
want_X = [int(x) for x in inut().split()]
want_Y = [int(x) for x in inut().split()]

print('No War' if max(want_X + X) < min(want_Y + Y) else 'War')


Fixed submission:
N, M, X, Y = tuple(map(int, input().split()))
area_X = [int(x) for x in input().split()]
area_Y = [int(x) for x in input().split()]
area_X.append(X)
area_Y.append(Y)

print('No War' if max(area_X) < min(area_Y) else 'War')
Buggy python submission (verdict: Runtime Error):
from math import log2


def action(nums, start=0):
    if any([e % 2 == 0 for e in nums]):
        return max([action(convert(nums, i), start+1) for i, e in enumerate(nums) if e % 2 == 0])
    else:
        return start

def convert(nums, i):
    alt_nums = nums[:]
    alt_nums[i] = nums[i] // 2
    return alt_nums

def main():
    _n = int(input())
    nums = [int(x) for x in input().split()]

    print(action(nums))

if __name__ == '__main__':
    main()

Fixed submission:
from math import log2


def action(n):
    count = 0
    while n % 2 == 0:
        n //= 2
        count += 1
    else:
        return count

def main():
    _n = int(input())
    nums = [int(x) for x in input().split()]

    print(sum([int(action(e)) for e in nums if e % 2 == 0]))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def get_arounds(target):
    return [(target[0] + x, target[1] + y) for x, y in ((1, 0), (0, 1), (-1, 0), (0, -1))]

def search_path(step, start, end, limit):
    if step == limit:
        return start == end

    return any([search_path(step + 1, a, end, limit) for a in get_arounds(start)])


if __name__ == '__main__':
    n = int(input())

    path = [tuple(map(int, input().split())) for _ in range(n)]

    step = 0
    start = (0, 0)
    for p in path:
        goal = (p[1], p[2])
        if not search_path(step, start, goal, p[0]):
            print('No')
            break
        step = p[0]
        start = goal
    else:
        print('Yes')


Fixed submission:
n = int(input())

goals = [tuple(map(int, input().split())) for _ in range(n)]

step = 0
start = (0, 0)
for g in goals:
    s = g[0] - step
    d = abs(g[1] - start[0]) + abs(g[2] - start[1])

    if s < d or s % 2 != d % 2:
        print('No')
        break

    step = g[0]
    start = (g[1], g[2])
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
N = int(input())
As = [int(input()) for _ in range(N)]

sunuke = 0
while all([a % 2 == 0 for a in As]):
    sunuke += 1
    As = [a / 2 for a in As]
print(sunuke)


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

sunuke = 0
while all([a % 2 == 0 for a in As]):
    sunuke += 1
    As = [a // 2 for a in As]
print(sunuke)
Buggy python submission (verdict: Time Limit Exceeded):
# B
n = int(input())

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

maxa = 10 **18

ans = 1

for i in a:
  ans = ans * i

print(ans if maxa >= ans else -1)

Fixed submission:
# B
n = int(input())

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

  

  

maxa = 10 **18

ans = 1
if min(a) == 0:
  ans = 0

for i in a:
  ans = ans * i
  if ans > maxa:
    print(-1)
    break
else:
  print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# B

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

ans = 0

for i in range(1,K+1):
  if i <= A:
    ans += 1
  elif i <= A+B:
    pass
  else:
    ans -= 1

print(ans)

Fixed submission:
# B

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

ans = 0

if K <= A:
  ans = K
elif K <= A+B:
  ans = A
elif K <= A+B+C:
  ans = A-(K-(A+B))

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

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

R = []
for i in range(M):
  R.append(list(map(int,input().split())))

ans = N

for i in range(0,N):
  flg = 0
  for r in R:
    if r[0] == i+1:
      if H[i] < H[r[1]]:
        flg = 1
        break
    if r[1] == i+1:
      if H[i] < H[r[0]]:
        flg = 1
        break
  
  if flg == 1:
    ans = ans - 1

print(ans)      







Fixed submission:
N,M = map(int,input().split())
H = [0]
H.extend(list(map(int,input().split())))

R = [[] for _ in range(N+1)]
for i in range(M):
  a,b = map(int,input().split())
  R[a].append(b)
  R[b].append(a)

ans = N

# print(H)
# print(R)

for i in range(1,N+1):
  for j in R[i]:
    if H[i] <= H[j]:
      ans = ans - 1
      break


print(ans)
Buggy python submission (verdict: Runtime Error):
X = int(input())

max_a = 128
min_a = -63

for i in range(-100,100):
    for j in range(-100,100):
      if i**5 - j **5 == X
      print(i,j)
      exit()
      






Fixed submission:
X = int(input())

flg = 0
for i in range(-200,200):
  if flg == 1:
    break

  for j in range(-200,200):
      if i**5 - j **5 == X:
        print(i,j)
        flg = 1
        break
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd

k = int(input())
ans = 0

a = [(i+1,j+1,l+1) for i in range(k) for j in range(k) for l in range(k)]

for i in a:
  ans += (gcd(gcd(i[0],i[1]),i[2]))


print(ans)

Fixed submission:
from math import gcd



k = int(input())
ans = 0

temp = []
for i in range(1,k+1):
  for j in range(1,k+1):
    temp.append(gcd(i,j))

import collections
c = collections.Counter(temp)

for i in range(1,k+1):
  for j in c.keys():
    ans += gcd(i,j) * c[j]

print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
q = int(input())

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = not flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if not flg else ss.appendleft(t[2])



print("".join(ss)) if flg else print("".join(ss[::-1]))



Fixed submission:
s = input()
q = int(input())

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = not flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if not flg else ss.appendleft(t[2])

ss = list(ss)

print("".join(ss)) if flg else print("".join(ss[::-1]))

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

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = !flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if flg != True else ss.appendleft(t[2])



print("".join(ss)) if flg else print("".join(ss[::-1]))



Fixed submission:
s = input()
q = int(input())

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = not flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if not flg else ss.appendleft(t[2])

ss = list(ss)

print("".join(ss)) if flg else print("".join(ss[::-1]))

Buggy python submission (verdict: Runtime Error):
s = input()
q = int(input())
ss = []

for i in range(q):
  t = input().split()
  if t[0] == '1':
    ss = ss[::-1]
  else:
    if t[1] == '2':
      ss.append(t[2])
    else:
      ss.insert(0,t[2]

print("".join(ss))



Fixed submission:
s = input()
q = int(input())

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = not flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if not flg else ss.appendleft(t[2])

ss = list(ss)

print("".join(ss)) if flg else print("".join(ss[::-1]))

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

for i in range(q):
  t = input().split()
  if t[0] == '1':
    s = s[::-1]
  else:
    if t[1] == '2':
      s = s + t[2]
    else:
      s = t[2] + s

print(s)



Fixed submission:
s = input()
q = int(input())

from collections import deque

ss = deque(s)
flg = True

for i in range(q):
  t = input().split()
  if t[0] == '1':
    flg = not flg
  else:
    if t[1] == '2':
        ss.append(t[2]) if flg else ss.appendleft(t[2])
    else:
        ss.append(t[2]) if not flg else ss.appendleft(t[2])

ss = list(ss)

print("".join(ss)) if flg else print("".join(ss[::-1]))
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())


from math import gcd

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

print(lcm(a,b))

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


from fractions import gcd

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

print(lcm(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())

# 最大n個は買う必要がある
n = x // 100

# 最低m個買う必要がある
m = x // 105

ans = 0
# もし割り切れたら、OK
for i in range(100,106):
  if x % i == 0:
    ans = 1
    break

import itertools
shinamono = [100,101,102,103,104,105] * (n)
for i in range(m,n+1):
  if ans == 1:
    break
  a = itertools.combinations(shinamono, i)
  for j in a:
    if sum(j) == x:
      ans = 1
      break

print(ans)


Fixed submission:
x = int(input())

ans = 0
for i in range(1,100001):
  if 100 * i <= x and 105 * i >= x:
    ans = 1
    break

print(ans)

Buggy python submission (verdict: Runtime Error):
x = int(input())

# 最大n個は買う必要がある
n = x // 100

# 最低m個買う必要がある
m = x // 105

ans = 0
# もし割り切れたら、OK
for i in range(100,106):
  if x % i == 0:
    ans = 1
    break

shinamono = [100,101,102,103,104,105] * (n+1-m)
for i in range(m,n+1):
  if ans == 1:
    break
  a = itertools.combinations(shinamono, i)
  for j in a:
    if sum(j) == x:
      ans = 1
      break

print(ans)






Fixed submission:
x = int(input())

ans = 0
for i in range(1,100001):
  if 100 * i <= x and 105 * i >= x:
    ans = 1
    break

print(ans)