Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):

flags = {}
edges = {}

def dfs(next, before, distance):
    global flags, edges
    if next == 1:
        return
    elif flags[next][1] < distance:
        return
    else:
        flags[next][0] = before
        flags[next][1] = distance
        nexts_tmp = edges[next]
        for n in nexts_tmp:
            dfs(n, next, distance + 1)

def main():
    global flags, edges
    n, m = map(int, input().split())
    flags = {e:[0, n+1] for e in range(1, n + 1)}
    edges = {e:set() for e in range(1, n + 1)}
    for _ in range(m):
        a, b = map(int, input().split())
        edges[a].add(b)
        edges[b].add(a)

    next_from1 = edges[1]
    for n1 in next_from1:
        dfs(n1,1,1)
    result = [flags[f][1] < (n + 1) for f in flags if f > 1]
    if not all(result):
        print('No')
    else:
        print('Yes')
        for i1 in range(2, n + 1):
            print(flags[i1][0])


if __name__ == '__main__':
    main()

Fixed submission:
from copy import deepcopy
def main():
    global flags, edges
    n, m = map(int, input().split())

    flags = {e:[n+1, n+1] for e in range(1, n + 1)}
    flags[1][1] = 0
    edges = {e:set() for e in range(1, n + 1)}
    edge_list = []
    for _ in range(m):
        a, b = map(int, input().split())
        edges[a].add(b)
        edges[b].add(a)
        edge_list.append((a, b))

    distance = 1
    node_next = list(edges[1])
    node_next_next = []
    while node_next:
        for next in node_next:
            if flags[next][1] > distance:
                flags[next][1] = distance
                node_next_next += edges[next]
        node_next = deepcopy(node_next_next)
        node_next_next = []
        distance += 1
    for edge in edge_list:
        e1 = edge[0]
        e2 = edge[1]
        if flags[e1][1] == flags[e2][1]:
            pass
        elif flags[e1][1] > flags[e2][1]:
            flags[e1][0] = min(flags[e1][0], e2)
        else:
            flags[e2][0] = min(flags[e2][0], e1)
    result = [flags[f][1] < (n + 1) for f in flags if f > 1]
    if not all(result):
        print('No')
    else:
        print('Yes')
        for i1 in range(2, n + 1):
            print(flags[i1][0])
            
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
from itertools import product
def main():
    n, m, x = map(int, input().split())
    books = []
    for _ in range(n):
        books.append(tuple(map(int, input().split())))

    books_set_all = []
    books_pattern = product((0, 1), repeat=n)
    for each_pattern in books_pattern:
        books_set = [0] * (m + 1)
        for i in each_pattern:
            if i:
                for i2 in range(m + 1):
                    books_set[i2] += books[i][i2]
        books_set_all.append(books_set)
    price_all = []
    for ebs in books_set_all:
        price = ebs[0]
        ebs[0] = x
        if len([j for j in ebs if j >= x]) == m + 1:
            price_all.append(price)
    if len(price_all) > 0:
        print(min(price_all))
    else:
        print(-1)

if __name__ == '__main__':
    main()


Fixed submission:

from itertools import combinations
from copy import deepcopy
def main():
    n, m, x = map(int, input().split())
    books = []
    for _ in range(n):
        books.append(list(map(int, input().split())))
    books_pattern = []
    books_num = [i for i in range(n)]
    for i1 in range(1, n + 1):
        books_pattern += list(combinations(books_num, i1))
    skill_set = []

    for ebp in books_pattern:
        skill_pattern = [0] * (m + 1)
        for ebpe in ebp:
            book_e = books[ebpe]
            for i2 in range(m + 1):
                skill_pattern[i2] += book_e[i2]
        skill_set.append(skill_pattern)

    skill_set_ok = []
    for ess in skill_set:
        tess = deepcopy(ess[1:])
        tessc = [i for i in tess if i >= x]
        if len(tessc) == m:
            skill_set_ok.append(ess[0])
    if len(skill_set_ok) > 0:
        print(min(skill_set_ok))
    else:
        print(-1)





if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import floor
from decimal import Decimal
def main():
    x = Decimal(input())

    r = 0
    m = Decimal(100)
    while m < x:
        r += 1
        m = Decimal(m * 1.01)
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
def main():
    x = int(input())
    c = 0
    m = 100
    while True:
        m = (m * 1.01)//1
        c += 1
        if m >= x:
            print(c)
            sys.exit()
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):

from operator import itemgetter
from copy import deepcopy

rlist = []
def dfs(i1,r1,alist1,q,qlist):
    if i1 >= q:
        rlist.append(r1)
    else:
        eq = qlist[i1]
        eq0 = eq[0]
        eq1 = eq[1]
        eq2 = eq[2]
        eq3 = eq[3]
        if alist1[eq0] != -1 and alist1[eq1] != -1 and alist1[eq1] - alist1[eq0] == eq2:
            r1 += eq3
        alist1t1 = deepcopy(alist1)
        dfs(i1+1, r1, alist1t1,q,qlist) #alistを変えずに再帰
        alist1t2 = deepcopy(alist1)
        if alist1t2[eq1] == -1 and alist1t2[eq0] == -1:
            alist1t2[eq1] = 100000
            alist1t2[eq0] = 100000 - eq2
            r1 += eq3
        elif alist1t2[eq1] == -1 and alist1t2[eq0] != -1:
            alist1t2[eq1] = alist1t2[eq0] + eq2
            r1 += eq3
        elif alist1t2[eq1] != -1 and alist1t2[eq0] == -1:
            alist1t2[eq0] = alist1t2[eq1] - eq2
            r1 += eq3
        dfs(i1+1,r1,alist1t2,q,qlist)

def main():
    n, m, q = map(int, input().split())
    qlist = []
    for _ in range(q):
        qlist.append(tuple(map(int, input().split())))
    qlist.sort(key=itemgetter(3), reverse=True)
    alist = [-1] * (n + 1)
    r = 0
    dfs(0,r,alist,q,qlist)
    print(max(rlist))

if __name__ == '__main__':
    main()

Fixed submission:
from itertools import combinations_with_replacement
def main():
    n, m, q = map(int, input().split())
    qlist = []
    for _ in range(q):
        qlist.append(tuple(map(int, input().split())))

    nums = [i for i in range(1, m + 1)]
    alist = tuple(combinations_with_replacement(nums, n))

    r = 0
    for al in alist:
        tr = 0
        for eq in qlist:
            eq0 = eq[0] - 1
            eq1 = eq[1] - 1
            eq2 = eq[2]
            eq3 = eq[3]
            if al[eq1] - al[eq0] == eq2:
                tr += eq3
        r = max(r, tr)

    print(r)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import floor
def main():
    a, b, n = map(int, input().split())

    amariset = set()
    for i1 in range(1, n + 1):
        amari = (i1 / b) % 1
        if amari in amariset:
            break
        else:
            amariset.add(amari)
    r = 0
    for amarie in amariset:
        rt = floor(amarie * a) - floor((amarie * a) % 1)
        r = max(r, rt)
    print(r)
if __name__ == '__main__':
    main()

Fixed submission:
from math import floor
def main():
    a, b, n= map(int, input().split())
    x = min(n, b - 1)
    r = floor((a * x) / b) - a * floor(x / b)
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import floor
def main():
    a, b, n = map(int, input().split())
    r = 0
    for i1 in range(1, n + 1):
        t = floor(a * i1 / b) - a * floor(i1 / b)
        r = max(r, t)
    print(r)
if __name__ == '__main__':
    main()

Fixed submission:
from math import floor
def main():
    a, b, n= map(int, input().split())
    x = min(n, b - 1)
    r = floor((a * x) / b) - a * floor(x / b)
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from math import floor
def main():
    a, b, n = map(int, input().split())

    r = 0
    for i in range(n+1):
        r = max(r, floor(a*i/b) - floor(i/b)*a)
    print(r)

if __name__ == '__main__':
    main()


Fixed submission:
from math import floor
def main():
    a, b, n= map(int, input().split())
    x = min(n, b - 1)
    r = floor((a * x) / b) - a * floor(x / b)
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from math import floor
def main():
    a, b, n = map(int, input().split())

    r = 0
    for i in range(n+1):
        r = max(r, floor(a*i/b) - floor(i/b)*a)
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
from math import floor
def main():
    a, b, n= map(int, input().split())
    x = min(n, b - 1)
    r = floor((a * x) / b) - a * floor(x / b)
    print(r)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())
    s = input()

    rr = [i for i, c in enumerate(s) if c == 'R']
    g = [i for i, c in enumerate(s) if c == 'G']
    b = [i for i, c in enumerate(s) if c == 'B']

    r = len(rr) * len(g) * len(b)
    for rre in rr:
        for ge in g:
            for be in b:
                r -= rre * 2 == ge + be
                r -= ge * 2 == rre + be
                r -= be * 2 == ge + rre
    print(r)

if __name__ == '__main__':
    main()


Fixed submission:
from math import gcd
def main():
    k = int(input())
    r = 0
    for ia in range(1, k + 1):
        for ib in range(1, k + 1):
            for ic in range(1, k + 1):
                t1 = gcd(ib, ic)
                r += gcd(t1,ia)
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    k = int(input())
    r = 0
    for ia in range(1, k + 1):
        for ib in range(1, k + 1):
            for ic in range(1, k + 1):
                t1 = gcd(ib, ic)
                r += gcd(t1,ia)
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
from math import gcd
def main():
    k = int(input())
    r = 0
    for ia in range(1, k + 1):
        for ib in range(1, k + 1):
            for ic in range(1, k + 1):
                t1 = gcd(ib, ic)
                r += gcd(t1,ia)
    print(r)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, k = map(int, input().split())
    if k == 1:
        print(0)
        sys.exit()
    r1 = k % n
    r2 = abs(r1 - k)
    r = min(r1, r2)
    print(r)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n, m = map(int, input().split())
    n = abs(n - (n // m) * m)
    n = min(n, abs(n - m))
    print(n)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n, k = map(int, input().split())
    r = n
    nums = set()
    while n not in nums:
        r = min(r, n)
        nums.add(n)
        n = abs(n - k)
    print(r)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, m = map(int, input().split())
    n = abs(n - (n // m) * m)
    n = min(n, abs(n - m))
    print(n)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n, k = map(int, input().split())
    r = n
    nums = set()
    while True:
        n = abs(n - k)
        if n in nums:
            break
        else:
            r = min(r, n)
            nums.add(n)
    print(r)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, m = map(int, input().split())
    n = abs(n - (n // m) * m)
    n = min(n, abs(n - m))
    print(n)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import log10,ceil
def main():
    k = int(input())
    k2 = ceil(k / 10)
    def getlun(n):
        lunluns.append(n)
        ns = str(n)
        print(lunluns)
        if len(ns) > k2:
            pass
        else:
            ns1 = int(ns[0])
            if ns1 != 0:
                l1 = ns[0] + ns
                getlun(int(l1))
            if ns1 > 1:
                l2 = str(ns1 - 1) + ns
                getlun(int(l2))
            if ns1 < 9:
                l3 = str(ns1 + 1) + ns
                getlun(int(l3))
    lunluns = []
    for i1 in range(0, 10):
        getlun(i1)
    lunluns.sort()
    print(lunluns[k])

if __name__ == '__main__':
    main()

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
from copy import deepcopy

def main():
    k = int(input())
    l = []
    ll = [1,2,3,4,5,6,7,8,9]

    def dfs(num, keta):
        #print(num,len(num),keta)

        if len(num) == keta:
            ll.append(int(num))
            #print(len(l))

        else:
            if num[-1] == '0':
                dfs(num + '0', keta)
                dfs(num + '1', keta)
            elif num[-1] == '9':
                dfs(num + '9', keta)
                dfs(num + '8', keta)
            else:
                dfs(num + str(int(num[-1]) + 1), keta)
                dfs(num + str(int(num[-1])), keta)
                dfs(num + str(int(num[-1]) - 1), keta)
    for i in range(2,10000):
        l = l + ll
        if len(l) > k:
            l.sort()
            print(l[k-1])
            break
        else:
            tmp_ll = deepcopy(ll)
            ll = []
            for el in tmp_ll:
                dfs(str(el), i)



if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
  from statistics import mean
  from math import floor,ceil

  n = int(input())
  x = list(map(int, input().split()))
  x_mean = mean(x) 
  if x_mean == 0.5:
      greater_than_x = len([i for i in x if i > x_mean])
      if greater_than_x * 2 >= n:
          x_mean = ceil(x_mean)
      else:
          x_mean = floor(x_mean)
  elif x_mean % 1 > 0.5:
      x_mean = ceil(x_mean)
  else:
      x_mean = floor(x_mean)
  x2 = [(num - x_mean)**2 for num in x]
  print(sum(x2))

main()

Fixed submission:
def main():
  from statistics import mean
  from math import floor,ceil

  n = int(input())
  x = list(map(int, input().split()))
  x_mean = mean(x) 
  if x_mean == 0.5:
      greater_than_x = len([i for i in x if i > x_mean])
      if greater_than_x * 2 >= n:
          x_mean = ceil(x_mean)
      else:
          x_mean = floor(x_mean)
  elif x_mean % 1 > 0.5:
      x_mean = ceil(x_mean)
  else:
      x_mean = floor(x_mean)
  x2 = [(num - x_mean)**2 for num in x]
  print(sum(x2))

main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    a = np.fromstring(read(), np.int64, sep=' ')[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) or (a % 5 == 0)):
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()


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

  r = 'APPROVED'

  for num in a:
    if num % 2 == 0:
      if num % 3 == 0 or num % 5 == 0:
        pass
      else:
        r = 'DENIED'
        break
  print(r)
  
main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
from collections import Counter
def main():
    n, *s = read().split()
    n = int(n)
    sc = Counter(s)
    scm = sc.most_common()
    maxnum = scm[0][1]
    r = []
    for i1 in range(n):
        if scm[i1][1] == maxnum:
            r.append(scm[i1][0])
        else:
            break
    r.sort()
    print(*r, sep="\n")

if __name__ == '__main__':
    main()


Fixed submission:
from collections import Counter
def main():
  n = int(input())
  s = [input() for _ in range(n)]
  s_c = Counter(s)
  s_c_l = [c for c in s_c.items()]
  m = max([c[1] for c in s_c_l])
  s_c_l_max = [c[0] for c in s_c_l if c[1] == m]
  s_c_l_max_s = set(s_c_l_max)
  s_c_l_max_s = sorted(s_c_l_max_s)
  for ch in s_c_l_max_s:
    print(ch)
  
main()
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    n, k = map(int, input().split())
    p = np.array(read().split(), np.int32)
    p += 1
    pcum = np.zeros(n + 1, np.int32)
    pcum[1:] = p.cumsum()
    sum_k = pcum[k:] - pcum[:-k]
    print(sum_k.max()/2)

if __name__ == '__main__':
    main()


Fixed submission:
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
psum[0] = sum(p[0:k])
for i in range(1, n - k + 1):
  psum[i] = psum[i-1] - p[i-1] + p[i + k - 1]
res = (max(psum)+k) / 2
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read

def main():
    n, k, *p = map(int, read().split())
    p2 = [(1 + pe) /2 for pe in p]
    r = 0
    for i1 in range(n - k + 1):
        r = max(r, sum(p2[i1:i1+k]))

    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
psum[0] = sum(p[0:k])
for i in range(1, n - k + 1):
  psum[i] = psum[i-1] - p[i-1] + p[i + k - 1]
res = (max(psum)+k) / 2
print(res)

Buggy python submission (verdict: Runtime Error):
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
psum[1] = sum(p[i:i+k])
for i in range(1, n - k + 1):
  psum[i] = psum[i-1] - p[i-1] + p[i + k - 1]
res = (max(psum)+k) / 2
print(res)

Fixed submission:
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
psum[0] = sum(p[0:k])
for i in range(1, n - k + 1):
  psum[i] = psum[i-1] - p[i-1] + p[i + k - 1]
res = (max(psum)+k) / 2
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
for i in range(n - k + 1):
  psum[i] = sum(p[i:i+k])
res = (max(psum)+k) / 2
print(res)

Fixed submission:
n, k = map(int,input().split())
p = [int(i) for i in input().split()]

psum = [0] * (n - k + 1)
psum[0] = sum(p[0:k])
for i in range(1, n - k + 1):
  psum[i] = psum[i-1] - p[i-1] + p[i + k - 1]
res = (max(psum)+k) / 2
print(res)
Buggy python submission (verdict: Runtime Error):
h a = map(int, input().split())
if h%a == 0:
  print(int(h/a))
else:
  print(int((h//a) + 1))

Fixed submission:
h, a = map(int, input().split())
if h%a == 0:
  print(int(h/a))
else:
  print(int((h//a) + 1))

Buggy python submission (verdict: Runtime Error):
h a = map(int, input().split())
print(h//a + 1)

Fixed submission:
h, a = map(int, input().split())
if h%a == 0:
  print(int(h/a))
else:
  print(int((h//a) + 1))
Buggy python submission (verdict: Runtime Error):
h = int(input())
if h == 0:
  print(0)
  quit()
def waruni(i):
  if i == 2 or i == 3:
    return 3
  else:        
    r = waruni(i//2) * 2 + 1
    return r
rus = waruni(h)
print(rus)
# I love kemofure

Fixed submission:
h = int(input())
if h == 0:
  print(0)
  quit()
i = 0
while True:
  if h < 2**i:
    print(2**i - 1)
    quit()
  else:
    i += 1
# I love kemofure

Buggy python submission (verdict: Runtime Error):
h = int(input())
def waruni(i):
  if i == 2 or i == 3:
    return 3
  else:        
    r = waruni(i//2) * 2 + 1
    return r
rus = waruni(h)
print(rus)
# I love kemofure

Fixed submission:
h = int(input())
if h == 0:
  print(0)
  quit()
i = 0
while True:
  if h < 2**i:
    print(2**i - 1)
    quit()
  else:
    i += 1
# I love kemofure
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    n, *a = map(int, read().split())

    p = np.array(a)
    minp = np.minimum.accumulate(p)
    r = 0
    for i1, ae in enumerate(a):
        r += minp[i1] >= ae

    print(r)

if __name__ == '__main__':
    main()


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

r = 0
x = 200001
for num in P:
  if x >= num:
    r += 1
    x = num
print(r)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n, *a = map(int, read().split())

    r = 0
    for i1 in range(n):
        r += min(a[:i1+1]) >= a[i1]

    print(r)

if __name__ == '__main__':
    main()


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

r = 0
x = 200001
for num in P:
  if x >= num:
    r += 1
    x = num
print(r)
Buggy python submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
from math import gcd

def main():
    n, m, *a = map(int, read().split())
    d = [0] * n
    for i, ae in enumerate(a):
        t1 = 0
        while ae > 0:
            if ae % 2 == 0:
                t1 += 1
                ae /= 2
            else:
                break
        d[i] = t1
    d_c = [de == d[0] for de in d]
    if not all(d_c):
        print(0)
        sys.exit()
    div = 2**d[0]
    a2 = [ae // div for ae in a]
    m /= div
    g = (a2[0] * a2[1]) // gcd(a2[0], a2[1])
    for i1 in range(1, n):
        g = (g * a2[i1]) // gcd(g, a2[i1])
        if g > m:
            print(0)
            sys.exit()

    r = m // g + 1
    print(int(r))

if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import gcd
from math import floor
def main():
    n, m, *a = map(int, read().split())
    if n == 1:
        r = m >= a[0]//2
        r += floor((m - a[0]//2) / a[0])
        print(int(r))
        sys.exit()
    d = [0] * n
    for i, ae in enumerate(a):
        t1 = 0
        while ae > 1:
            if ae % 2 == 0:
                t1 += 1
                ae /= 2
            else:
                break
        d[i] = t1
    d_c = [de == d[0] for de in d]
    if not all(d_c):
        print(0)
        sys.exit()
    
    div = 2
    a2 = [ae // div for ae in a]
    g = (a2[0] * a2[1]) // gcd(a2[0], a2[1])
    for i1 in range(1, n):
        g = (g * a2[i1]) // gcd(g, a2[i1])
        if g > m:
            print(0)
            sys.exit()
    r = m >= g
    r += floor((m - g) / (g * 2))
    print(int(r))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
print(6 - a - b)

Fixed submission:
a_list = []
a_list.append(int(input()))
a_list.append(int(input()))

if 1 not in a_list:
  print(1)
elif 2 not in a_list:
  print(2)
else:
  print(3)

Buggy python submission (verdict: Runtime Error):
a_set = {}
a_set.add(int(input()))
a_set.add(int(input()))

all_set = {1,2,3}
print(all_set.difference(a_set)[0])


Fixed submission:
a_list = []
a_list.append(int(input()))
a_list.append(int(input()))

if 1 not in a_list:
  print(1)
elif 2 not in a_list:
  print(2)
else:
  print(3)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = input()
B = input()
 
r = ""
for i in range(N):
  r+= A[i]
  r+= B[i]
print(r)

Fixed submission:
N = int(input())
A, B = input().split()
 
r = ""
for i in range(N):
  r+= A[i]
  r+= B[i]
print(r)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = input()
B = input()
 
r = ""
for i in range(N):
  r+= A[i]
  r+= B[i]
print(r)

Fixed submission:
N = int(input())
A, B = input().split()
 
r = ""
for i in range(N):
  r+= A[i]
  r+= B[i]
print(r)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = input()
B = input()

r = ""
for i in range(N):
  i+= A[i]
  i+= B[i]

Fixed submission:
N = int(input())
A, B = input().split()
 
r = ""
for i in range(N):
  r+= A[i]
  r+= B[i]
print(r)
Buggy python submission (verdict: Runtime Error):
from math import gcd
def main():
    a, b = = map(int, input().split())
    r = (a * b) // gcd(a, b)
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    x, y = map(int, input().split())
    mul_xy = x * y
    while True:
        x, y = y, x % y
        if not y:
            break
    print(int(mul_xy / x))

if __name__ == '__main__':
    main()