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

N = int(input())
x = [0] * N
y = [0] * N

for n in range(N):
    x[n], y[n] = map(int, input().split())


# print(x)
# print(y)

def root(xi, yi, xj, yj):
    return math.sqrt((xi - xj) ** 2 + (yi - yj) **2)

# print(root(1, 0, 0, 0))
# print(root(0, 0, 0, 1))


# a = root(4, 3, 6, 2)
# print(a)



# x1 = (-406, 10)
# x2 = ( 512, 859)
# x3 = ( 494, 362)
# x4 = (-955, -475)
# x5 = ( 128, 553)
# x6 = (-986, -885)
# x7 = ( 763, 77)
# x8 = ( 449, 310)
#

l = x +y
# l = [x1, x2, x3, x4, x5, x6, x7, x8]
m = 0
for i in itertools.permutations(l, len(l)):
    k = 0
    for j in range(len(i) -1):
        k += root(*(i[j] + i[j+1]))
    m += k
print(m/math.factorial(len(l)))


Fixed submission:
import math
import itertools

N = int(input())
x = [list(map(int, input().split())) for i in range(N)]


# print(x)
# print(y)

def root(xi, yi, xj, yj):
    return math.sqrt((xi - xj) ** 2 + (yi - yj) **2)

# print(root(1, 0, 0, 0))
# print(root(0, 0, 0, 1))


# a = root(4, 3, 6, 2)
# print(a)



# x1 = (-406, 10)
# x2 = ( 512, 859)
# x3 = ( 494, 362)
# x4 = (-955, -475)
# x5 = ( 128, 553)
# x6 = (-986, -885)
# x7 = ( 763, 77)
# x8 = ( 449, 310)
#

l = x
# print(l)
# l = [x1, x2, x3, x4, x5, x6, x7, x8]

m = 0
for i in itertools.permutations(l, len(l)):
    k = 0
    for j in range(len(i) -1):
        k += root(*(i[j] + i[j+1]))
    m += k
print(m/math.factorial(len(l)))

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

N = int(input())
x = [0] * N
y = [0] * N

for n in range(N):
    x[n], y[n] = map(int, input().split())


def root(xi, yi, xj, yj):
    return math.sqrt((xi - xj) ** 2 + (yi - yj) **2)

# print(root(1, 0, 0, 0))
# print(root(0, 0, 0, 1))


# a = root(4, 3, 6, 2)
# print(a)



# x1 = (-406, 10)
# x2 = ( 512, 859)
# x3 = ( 494, 362)
# x4 = (-955, -475)
# x5 = ( 128, 553)
# x6 = (-986, -885)
# x7 = ( 763, 77)
# x8 = ( 449, 310)
#

# l = [x1, x2, x3, x4, x5, x6, x7, x8]
m = 0
for i in itertools.permutations(l, len(l)):
    k = 0
    for j in range(len(i) -1):
        k += root(*(i[j] + i[j+1]))
    m += k
print(m/math.factorial(len(l)))


Fixed submission:
import math
import itertools

N = int(input())
x = [list(map(int, input().split())) for i in range(N)]


# print(x)
# print(y)

def root(xi, yi, xj, yj):
    return math.sqrt((xi - xj) ** 2 + (yi - yj) **2)

# print(root(1, 0, 0, 0))
# print(root(0, 0, 0, 1))


# a = root(4, 3, 6, 2)
# print(a)



# x1 = (-406, 10)
# x2 = ( 512, 859)
# x3 = ( 494, 362)
# x4 = (-955, -475)
# x5 = ( 128, 553)
# x6 = (-986, -885)
# x7 = ( 763, 77)
# x8 = ( 449, 310)
#

l = x
# print(l)
# l = [x1, x2, x3, x4, x5, x6, x7, x8]

m = 0
for i in itertools.permutations(l, len(l)):
    k = 0
    for j in range(len(i) -1):
        k += root(*(i[j] + i[j+1]))
    m += k
print(m/math.factorial(len(l)))
Buggy python submission (verdict: Runtime Error):
N = int(sys.stdin.readline())
d = list(map(int, input().split()))

recover = []

c = 0
for i in d:
    c += 1
    recover.append(i * sum(d[c:N]))

print(sum(recover))


Fixed submission:
import sys
N = int(sys.stdin.readline())
d = list(map(int, input().split()))

recover = []

c = 0
for i in d:
    c += 1
    recover.append(i * sum(d[c:N]))

print(sum(recover))
Buggy python submission (verdict: Runtime Error):
S = input()

# import decimal
import math


odd = []
oddness = []


for i in range(S):
    j = i + 1
    if j % 2 != 0:
        odd.append(j)

# decimal.getcontext().prec = 7
# print(decimal.Decimal(len(odd)) / decimal.Decimal(j))
answer = len(odd) / j

print(round(answer, 7))


Fixed submission:
import sys
import math
N = int(sys.stdin.readline())
# import decimal


odd = []
oddness = []


for i in range(N):
    j = i + 1
    if j % 2 != 0:
        odd.append(j)

# decimal.getcontext().prec = 7
# print(decimal.Decimal(len(odd)) / decimal.Decimal(j))
answer = float(len(odd)) / float(j)
print(answer)
Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = list(map(int, input().split()))


count = 0
for i in h:
    if i >= K:
        count += 1

print(count)


Fixed submission:
N, K = list(map(int, input().split()))
h = list(map(int, input().split()))


count = 0
for i in h:
    if i >= K:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Fixed submission:
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2  
    if mod == 1:
        print('Yes')  
        break
    print('No') 
    break

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Fixed submission:
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2  
    if mod == 1:
        print('Yes')  
        break
    print('No') 
    break

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Fixed submission:
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2  
    if mod == 1:
        print('Yes')  
        break
    print('No') 
    break

Buggy python submission (verdict: Runtime Error):
a = input()                                                                                             
b = input()

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


for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Fixed submission:
# -*- coding: utf-8 -*-

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

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2  
    if mod == 1:
        print('Yes')  
        break
    print('No') 
    break
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())

list=[1, 2, 3]

list.pop(a)
list.pop(b)

print(list[0])

Fixed submission:
a=int(input())
b=int(input())

list=[1, 2, 3]

list.remove(a)
list.remove(b)

print(list[0])
Buggy python submission (verdict: Time Limit Exceeded):
n, k ,q = list(map(int, input().split()))
li = [input() for i in range(q)]
list = []
for j in range(1,n+1):
    L = str(j)
    if li.count(L) > q - k:
        list.append('Yes')
    else:
        list.append('No')
[print(x) for x in list]

Fixed submission:
n, k ,q = list(map(int, input().split()))
listAns = [input() for i in range(q)]
score = [0] * n
count = 0
for j in listAns:
    score[int(j) - 1] += 1
for h in score:
    if h > q - k:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k ,q = list(map(int, input().split()))
li = [input() for i in range(q)]
list = []
for j in range(1,n+1):
    if li.count(str(j)) > q - k:
        list.append('Yes')
    else:
        list.append('No')
[print(x) for x in list]


Fixed submission:
n, k ,q = list(map(int, input().split()))
listAns = [input() for i in range(q)]
score = [0] * n
count = 0
for j in listAns:
    score[int(j) - 1] += 1
for h in score:
    if h > q - k:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k ,q = list(map(int, input().split()))
li = [input() for i in range(q)]
list = []
for i in range(1,n+1):
    if li.count(str(i)) > q - k:
        list.append('Yes')
    else:
        list.append('No')
[print(x) for x in list]


Fixed submission:
n, k ,q = list(map(int, input().split()))
listAns = [input() for i in range(q)]
score = [0] * n
count = 0
for j in listAns:
    score[int(j) - 1] += 1
for h in score:
    if h > q - k:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k ,q = list(map(int, input().split()))
li = [input() for i in range(q)]
list = []
for i in range(1,n+1):
    if li.count(str(i)) > q - k:
        list.append('Yes')
    else:
        list.append('No')
[print(x) for x in list]


Fixed submission:
n, k ,q = list(map(int, input().split()))
listAns = [input() for i in range(q)]
score = [0] * n
count = 0
for j in listAns:
    score[int(j) - 1] += 1
for h in score:
    if h > q - k:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(0,n):
    ans += b[a[i]-1]
    if i != 0 and a[i-1]+1 == a[i]:
        ans += c[a[i]-1]
print(ans)


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

ans = 0
for i in range(0,n):
    ans += b[a[i]-1]
    if i != 0 and a[i-1]+1 == a[i]:
        ans += c[a[i-1]-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
s = input()
if input(a) >= 3200:
    print(s)
else:
    print('red')

Fixed submission:
a = input()
s = input()
if int(a) >= 3200:
    print(s)
else:
    print('red')

Buggy python submission (verdict: Runtime Error):
a = input()
s = input()
if input(a) >= 3200:
    print(s)
else:
    print('red')

Fixed submission:
a = input()
s = input()
if int(a) >= 3200:
    print(s)
else:
    print('red')

Buggy python submission (verdict: Runtime Error):
s = list(input())
t = list(input())
count = 0
for i in range(0,3):
    if s[i] == t[i]:
        count += 1
print(count)


Fixed submission:
a = input()
s = input()
if int(a) >= 3200:
    print(s)
else:
    print('red')
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split)
if (a*b) % 2 == 0 :
  print("Even")
else:
  print("Odd")

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2 == 1:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = input().split(' ')
l = [int(i) for i in l]
l.sort(reverse=True)

addList = []
for i in range(n):
    for j in range(i+1, n):
        addList.append({
            "num": l[i] + l[j],
            "i": i,
            "j": j
        })

# print(l)
cnt = 0
st = 0
for a in addList:
    for i in range(st, n):
        if a["i"] <= i or a["j"] <= i:
            # print(i, a["i"], a["j"])
            continue
        if a["num"] > l[i]:
            cnt += 1
            # print(i, a["i"], a["j"])
        else:
            st = i

print(cnt)


Fixed submission:
import bisect

n = int(input())
l = input().split(' ')
l = [int(i) for i in l]
l.sort()

cnt = 0
for i in range(n):
    for j in range(i+1, n):
        num = l[i] + l[j]
        index = bisect.bisect_left(l, num)
        # print(index, j)
        # print(index-2)
        cnt += (index-j-1)

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = input().split(' ')
l = [int(i) for i in l]
l.sort(reverse=True)

cnt = 0
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if l[i] < (l[j] + l[k]):
                # print(i, j, k)
                cnt += 1

print(cnt)
# print(l)


Fixed submission:
import bisect

n = int(input())
l = input().split(' ')
l = [int(i) for i in l]
l.sort()

cnt = 0
for i in range(n):
    for j in range(i+1, n):
        num = l[i] + l[j]
        index = bisect.bisect_left(l, num)
        # print(index, j)
        # print(index-2)
        cnt += (index-j-1)

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
import time
time.sleep(19)

Fixed submission:
print(int(input())**3)
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = []

for x in range(n):
  for y in range(n):
    if x * y == n:
      li.append(x+y-2)

result = min(li) 
print(result)

Fixed submission:
n = int(input())
li = []

for x in range(1, int(n ** 0.5)+1):
  if n % x == 0:
    y = n/x
    li.append(x+y-2)  
     
result = min(li) 
print(int(result))
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
count = 0

for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
      if x+y+z == s:
        count += 1

print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0

for x in range(k+1):
  for y in range(k+1):
    if 0 <= s-(x+y) <= k:
      count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
import copy

n = int(input())
t_li = list(map(int, input().split()))
m = int(input())
px_li = []
result = []

for i in range(m):
  p, x = map(int, input().split())
  px_li.append([p, x])

for j in range(m):
  c_li = copy.copy(t_li)
  c_li[j] = px_li[j][1]
  result.append(str(sum(c_li)))

string = "\n".join(result)
print(string)


Fixed submission:
import copy

n = int(input())
t_li = list(map(int, input().split()))
m = int(input())
px_li = []
result = []

for i in range(m):
  p, x = map(int, input().split())
  px_li.append([p, x])

for j in range(m):
  c_li = copy.copy(t_li)
  c_li[px_li[j][0] - 1] = px_li[j][1]
  result.append(str(sum(c_li)))

string = "\n".join(result)
print(string)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ls = list(map(int, input().split())

print(max(ls) - min(ls))

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

print(max(ls) - min(ls))
Buggy python submission (verdict: Runtime Error):
import math

data = list(map(int, input().split()))
A, B = data[0], data[1]
g = math.gcd(A, B)
lcd = int(A*B/g)
print(lcd)

Fixed submission:
data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))

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

data = list(map(int, input().split()))
A, B = data[0], data[1]
gcd = math.gcd(A, B)
lcd = A*B//gcd
print(lcd)

Fixed submission:
data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))

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

data = list(map(int, input().split()))
A, B = data[0], data[1]
gcd = math.gcd(A, B)
print(A*B//gcd)

Fixed submission:
data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))

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

data = list(map(int, input().split()))
A, B = data[0], data[1]
gcd = math.gcd(A, B)
print(int(A*B/gcd))

Fixed submission:
data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N < 2:
    F = 1
    print(0)
elif N % 2 == 1:
    print(0)
else:
    t = 10
    result = 0
    while t <= N:
        result += N // t
        t = t * 5
print(result)

Fixed submission:
from sys import exit

N = int(input())
if N < 2:
    F = 1
    print(0)
    exit()
elif N % 2 == 1:
    print(0)
    exit()
else:
    t = 10
    result = 0
    while t <= N:
        result += N // t
        t = t * 5
print(result)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, [input() for i in range(2)])
result = 6-a-b
return result

Fixed submission:
a, b = map(int, [input() for i in range(2)])
result = 6-a-b
print(result)
Buggy python submission (verdict: Runtime Error):
AB, BC, CA = map(int, input().split())

print(int(AB + BC + CA) / 2))

Fixed submission:
import math

AB, BC, CA = map(int, input().split())
s = (AB + BC + CA) / 2

print(int(math.sqrt(s* (s - AB) * (s - BC) * (s - CA))))
Buggy python submission (verdict: Runtime Error):
X Y = map(int, input().split())

print(X + int(Y / 2))

Fixed submission:
X, Y = map(int, input().split())

print(X + int(Y / 2))
Buggy python submission (verdict: Runtime Error):
import math

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

a,b = map(int,input().split())
print(lcm(a,b))

Fixed submission:
import fractions

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

a,b = map(int,input().split())
print(lcm(a,b))

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

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

a,b = map(int,input().split())
print(lcm(a,b))

Fixed submission:
import fractions

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

a,b = map(int,input().split())
print(lcm(a,b))
Buggy python submission (verdict: Runtime Error):
a = input()
if a == SUN:
  print(7)
elif a == MUN:
  print(6)
elif a==TUE:
  print(5)
elif a==WEN:
  print(4)
elif a==THU:
  print(3)
elif a==FRI:
  print(2)
elif a==SAT:
  print(1)
  

Fixed submission:
a = input()
if a == 'SUN':
  print(7)
elif a == 'MON':
  print(6)
elif a=='TUE':
  print(5)
elif a=='WED':
  print(4)
elif a=='THU':
  print(3)
elif a=='FRI':
  print(2)
elif a=='SAT':
  print(1)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
#a,b=1,2
all = [1,2,3]
#result = next(filter(lambda x: x in [a,b], all))
result = filter(lambda x: not x in [a,b], all)
print(result[0])


Fixed submission:
a, b = input(), input()
#a,b=2,3
a,b= [int(i) for i in [a,b]]
all = [1,2,3]
result = list(filter(lambda x: not x in [a,b], all))
print(result[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = [[int(i) for i in input().split()] for i in range(n)]
prev = 0
flag = False
result = 0
for i in l:
    if flag == False and i == prev:
        flag = True
        result += 1
    elif flag == True:
        flag = False
    prev = i
print(result)

Fixed submission:
n = int(input())
l = input().split()
prev = 0
flag = False
result = 0
for i in l:
    if flag == False and i == prev:
        flag = True
        result += 1
    elif flag == True:
        flag = False
    prev = i
print(result)
Buggy python submission (verdict: Runtime Error):
import math

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

print((a * b) // math.gcd(a, b))

Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s,t = input().split()
u = ""
for i in range(n):
    u = u + s[i] + t[i]

print(u)

Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)

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

for i in range(n):
    u = u + s[i] + t[i]

print(u)


Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)

Buggy python submission (verdict: Runtime Error):
A= int,input()
B= int,input()
# A,Bの入力

print(6-A-B)

Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s,t = input().split()
 
for i in range(n):
    u = u + s[i] + t[i]
 
print(u)

Fixed submission:
n = int(input())
s,t = map(str,input().split())
u = ""
for i in range(n):
    u = u + s[i] + t[i]

print(u)
Buggy python submission (verdict: Runtime Error):
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

print(lcm(a,b))


Fixed submission:
import fractions
 
A, B = map(int, input().split())
 
print((A * B) // fractions.gcd(A, B))

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

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

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

print(lcm(a,b))

Fixed submission:
import fractions
 
A, B = map(int, input().split())
 
print((A * B) // fractions.gcd(A, B))

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

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

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

print(lcm(a,b))


Fixed submission:
import fractions
 
A, B = map(int, input().split())
 
print((A * B) // fractions.gcd(A, B))
Buggy python submission (verdict: Runtime Error):
n, k, q = map(int,input().split())

A = [int(input()) for i in range(q)]

cntA = Counter(A)

for i in range(1, n +1):
    if (k - q + cntA[i] >= 1 ):
        print('Yes')
    else :
        print('No')

Fixed submission:
from collections import deque, defaultdict, Counter

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

A = [int(input()) for i in range(q)]

cntA = Counter(A)

for i in range(1, n +1):
    if (k - q + cntA[i] >= 1 ):
        print('Yes')
    else :
        print('No')
Buggy python submission (verdict: Runtime Error):
#入力
a=input()
b=input()
#選別
print(6-a-b)

    




Fixed submission:
a=int(input())
b=int(input())

print(6-a-b)
Buggy python submission (verdict: Runtime Error):
a1, a2, a3 = int(input().split(" "))

if(a1+a2+a3 >= 22):
  print("bust")
else:
  print("win")

Fixed submission:
a1, a2, a3 = [int(i) for i in input().split()]

if(a1+a2+a3 >= 22):
  print("bust")
else:
  print("win")
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

ans = 6-a-b
print(ans)


Fixed submission:
a = int(input())
b = int(input())

ans = 6-a-b
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K, A, B = (int(i) for i in input().split())
num = 1
while True:
    if A + 2 - num >= B:
        print(K + num)
        break
    elif num >= A:
        if (K // 2) is not 0:
            print(num + (K // 2) * (B - A) + (K % 2))
            break
    else:
        if K >= 2 and K >= (A + 2 - num):
            K -= (A + 2 - num)
            num = B
        else:
            print(K + num)
            break


Fixed submission:
K, A, B = (int(i) for i in input().split())
num = 1
while True:
    if A + 2 - num >= B:
        print(K + num)
        break
    elif num >= A and (K // 2) is not 0:
        print(num + (K // 2) * (B - A) + (K % 2))
        break
    elif K >= 2 and K >= (A + 2 - num):
        K -= (A + 2 - num)
        num = B
    else:
        print(K + num)
        break
Buggy python submission (verdict: Runtime Error):
N = input()
H = input()
W = input()
print((N - H + 1) * (N - W + 1))

Fixed submission:
N = int(input())
H = int(input())
W = int(input())
print((N - H + 1) * (N - W + 1))
Buggy python submission (verdict: Runtime Error):
a, b, c = (int(i) for i in input().split())
if a + b + 1 > c:
    return b + c

else:
    return 2 * b + a + 1

Fixed submission:
a, b, c = (int(i) for i in input().split())
if a + b + 1 > c:
    print(b + c)

else:
    print(2 * b + a + 1)