Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from numpy import gcd

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n-1)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]
else:
    ans = 0

print(ans)

Fixed submission:
def gcd(a, b):
    m, n = max(a,b), min(a,b)
    while n != 0:
        m, n = n, m%n
    return m

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]


print(ans)

Buggy python submission (verdict: Runtime Error):
from numpy import gcd

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x.sort()
diff_x = [x[i+1] - x[i] for i in range(n-1)]
ans = 1
for x_i in x:
    ans = int(gcd(ans, x_i))

print(ans)


Fixed submission:
def gcd(a, b):
    m, n = max(a,b), min(a,b)
    while n != 0:
        m, n = n, m%n
    return m

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]


print(ans)

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

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n-1)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = math.gcd(ans, dx)
elif len(x) == 2:
    ans = x[1] - x[0]
else:
    ans = 0

print(ans)

Fixed submission:
def gcd(a, b):
    m, n = max(a,b), min(a,b)
    while n != 0:
        m, n = n, m%n
    return m

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]


print(ans)

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

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n-1)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = math.gcd(ans, dx)
else:
    ans = x[1] - x[0]

print(ans)

Fixed submission:
def gcd(a, b):
    m, n = max(a,b), min(a,b)
    while n != 0:
        m, n = n, m%n
    return m

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]


print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
x1, y1, x2, y2 = map(int, input().split())

R = np.array([[0,-1],[1,0]])

r1 = np.array([x2-x1, y2-y1])
r2 = R @ r1
x3, y3 = r2 + np.array([x2, y2])
r3 = R @ r2
x4, y4 = r3 + np.array([x3, y3])

print(x3, y3, x4, y4)

Fixed submission:
import numpy as np
x1, y1, x2, y2 = map(int, input().split())

R = np.array([[0,-1],[1,0]])

r1 = np.array([x2-x1, y2-y1])
r2 = np.dot(R, r1)
x3, y3 = r2 + np.array([x2, y2])
r3 = np.dot(R, r2)
x4, y4 = r3 + np.array([x3, y3])

print(x3, y3, x4, y4)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a + b == 15:
    print("+"):
elif a * b == 15:
    print("*")
else:
    print("x")

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

if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")
Buggy python submission (verdict: Runtime Error):
import itertools

N, M = map(int, input().split())
x = [None] * N
y = [None] * N
z = [None] * N


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

if M == 0:
    print(0)
elif M == 1:
    vallist = [abs(x[i]) + abs(y[i]) + abs(z[i]) for i in range(N)]
    print(max(vallist))
elif M == N:
    print(abs(sum(x[i])) + abs(sum(y[i])) + abs(sum(z[i])))
else:
    ans = 0
    v = 0
    for I in itertools.combinations([i for i in range(N)], M):
        I = list(I)
        v = abs(sum([x[i] for i in I]))
        v += abs(sum([y[i] for i in I]))
        v += abs(sum([z[i] for i in I]))
        ans = max(ans, v)
    print(ans)

Fixed submission:
N, M = map(int, input().split())
x = [None] * N
y = [None] * N
z = [None] * N

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

ans = 0

for xs in [1, -1]:
    for ys in [1, -1]:
        for zs in [1, -1]:
            D = [xs*x[i] + ys*y[i] + zs*z[i] for i in range(N)]
            D.sort(reverse=True)
            ans = max(ans, sum(D[:M]))

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
max_shurui = 0
for n in range(1,N):
    X, Y = set(S[:n]), set(S[n:])
    max_shurui = max(len(X&Y), max_shurui)
print(max_shurui)

Fixed submission:
A, B = map(int, input().split())
print(max(A+B, A-B, A*B))

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max(A+B, A−B, A×B))

Fixed submission:
A, B = map(int, input().split())
print(max(A+B, A-B, A*B))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = int(input())
max_shurui = 0
for n in range(1,N):
    X, Y = set(S[:n]), set(S[n:])
    max_shurui = max(len(X&Y), max_shurui)
print(max_shurui)

Fixed submission:
N = int(input())
S = input()
max_shurui = 0
for n in range(1,N):
    X, Y = set(S[:n]), set(S[n:])
    max_shurui = max(len(X&Y), max_shurui)
print(max_shurui)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split))

def 割れる回数(a):
    回数 = 0
    while a % 2 == 0:
        回数 += 1
        a = a // 2
    return 回数

割れる回数のリスト = [割れる回数(a_i) for a_i in a]
答え = min(割れる回数のリスト)
print(答え)

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

def 割れる回数(a):
    回数 = 0
    while a % 2 == 0:
        回数 += 1
        a = a // 2
    return 回数

割れる回数のリスト = [割れる回数(a_i) for a_i in a]
答え = min(割れる回数のリスト)
print(答え)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

A_r = A[::-1]

cumsum_A = np.cumsum(A)
cumsum_A_r = np.cumsum(A_r)

x = [abs(a - a_r) for (a, a_r) in zip(cumsum_A[:-1], cumsum_A_r[-2::-1])]
print(min(x))

Fixed submission:
import numpy as np
N = int(input())
A = list(map(int, input().split()))

A_r = A[::-1]

cumsum_A = np.cumsum(A)
cumsum_A_r = np.cumsum(A_r)

x = [abs(a - a_r) for (a, a_r) in zip(cumsum_A[:-1], cumsum_A_r[-2::-1])]
print(min(x))
Buggy python submission (verdict: Runtime Error):
r = int(input())
return 2 * 3.14 * r

Fixed submission:
r = int(input())
print(2 * 3.14 * r)
Buggy python submission (verdict: Runtime Error):
k, x = input().split()
if x % 500 == 0 and k * 500 <= x:
  print('Yes')
else:
  print('No')


Fixed submission:
k, x = map(int, input().split())
if k * 500 >= x:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a = {1, 2, 3}
a.remove(int(input())
a.remove(int(input())
print(list(a)[0])

Fixed submission:
a = {1, 2, 3}
a.remove(int(input()))
a.remove(int(input()))
print(list(a)[0])
Buggy python submission (verdict: Runtime Error):
a1, a2, a3 = map(int, input().split())
return 'bust' if a1+a2+a3 >= 22 else 'win'

Fixed submission:
a1, a2, a3 = map(int, input().split())
print('bust' if a1+a2+a3 >= 22 else 'win')
Buggy python submission (verdict: Runtime Error):
# redcoder
string = input()
n = len(string) - 1
if n == 1:
	print(0)
    exit(0)
    
s = 0 
e = n
count = 0
while e > s:
	if string[e] != string[s]:
    	count += 1
    e -= 1
    s += 1

print(count)


Fixed submission:
# redcoder
string = input()
n = len(string) - 1

s = n//2 + 1
count = 0
for i in range(s):
  if string[i] != string[n-i]:
    count += 1
 
print(count)
Buggy python submission (verdict: Runtime Error):
return int(input()**2)

Fixed submission:
print(int(input())**2)
Buggy python submission (verdict: Runtime Error):
print(if 'AC' in input())

Fixed submission:
print('Yes' if 'AC' in input() else 'No')
Buggy python submission (verdict: Runtime Error):

N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X and n<=(N+1)):
    n = n+1
    curCoord = curCoord+L[n-2]
    
print(n-1)

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

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)

Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n=n+1
    curCoord = curCoord+L[n-2]
    
print(str(n-1))

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

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)

Buggy python submission (verdict: Runtime Error):

N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n=n+1
    curCoord = curCoord+L[n-2]
    
print(n-1)

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

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!

N,M = map(int,input().split())
L,R = map(int,input().split())
curSet = set(range(L,R+1))

for i in range(2,M+1):
    L,R = map(int,input().split())
    curVec = set(range(L,R+1))

    curSet = curSet.intersection(curVec)
    
print(len(curSet))

Fixed submission:
# coding: utf-8
# Your code here!

N,M = map(int,input().split())
L = [0]*M
R = [0]*M
#Li,Ri = map(int,input().split())

for i in range(1,M+1):
    L[i-1],R[i-1] = map(int,input().split())

validID = min(R)-max(L)+1

if (validID>0):
    print(validID)
else:
    print("0")

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!

N,M = map(int,input().split())

for i in range(1,M+1):
    L,R = map(int,input().split())
    curVec = set(range(L,R+1))
    
    if (i==1):
        curSet = curVec
    
    curSet = curSet.intersection(curVec)
    
print(len(curSet))

Fixed submission:
# coding: utf-8
# Your code here!

N,M = map(int,input().split())
L = [0]*M
R = [0]*M
#Li,Ri = map(int,input().split())

for i in range(1,M+1):
    L[i-1],R[i-1] = map(int,input().split())

validID = min(R)-max(L)+1

if (validID>0):
    print(validID)
else:
    print("0")
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
  return reduce(math.gcd, numbers)

K = int(input())
sum = 0
for a in range(1, K + 1):
  for b in range(1, K + 1):
    for c in range(1, K + 1):
      sum += gcd(a, b, c)
print(sum)

Fixed submission:
def gcd(p, q):
  while q != 0:
    r = p % q
    p = q
    q = r
  return p

K = int(input())
sum = 0
for a in range(1, K + 1):
  for b in range(1, K + 1):
    for c in range(1, K + 1):
      sum += gcd(gcd(a, b), c)
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
def count(P):
  cnt = 0
  for i in range(N):
    min = P[i]
    for j in range(i):
      if min > P[j]:
        min = P[j]
    if min == P[i]:
      cnt += 1
        
  return cnt

N = int(input())
P = list(map(int, input().split()))
print(count(P))

Fixed submission:
def count(P, N):
  cnt = 0
  min = P[0]
  M = [0] * N
  for i in range(N):
    if P[i] <= min:
      M[i] = P[i]
      min = P[i]
      cnt += 1
    else:
      M[i] = min
        
  return cnt

N = int(input())
P = list(map(int, input().split()))
print(count(P, N))
Buggy python submission (verdict: Runtime Error):
def connect(a, b):
  return b + a

s = input()
t = input()
print(connect(s, t))

Fixed submission:
def connect(s):
  return s[1] + s[0]

s = input().split()
print(connect(s))
Buggy python submission (verdict: Runtime Error):
a = input()
print(6.28318530717958623200*a)

Fixed submission:
a=input()
print(eval(a)*6.28318530717958623200)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
boss_list = list(map(int, input().split(" ")))

boss_list = sorted(boss_list)


for i in range(1, n+1):
    # boss_count = boss_list.count(i)
    boss_count = 0
    while (True):
        index = 0
        if boss_list[index] == i:
            boss_count += 1
        else:
            break

    del boss_list[:boss_count]
    print(boss_count)

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

boss_count_list = [0] * n


for val in boss_list:
  boss_count_list[val - 1] += 1

for val in boss_count_list:
  print(val)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
boss_list = list(map(int, input().split(" ")))

boss_list = sorted(boss_list)


for i in range(1, n+1):
    boss_count = boss_list.count(i)
    del boss_list[:boss_count]
    print(boss_count)

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

boss_count_list = [0] * n


for val in boss_list:
  boss_count_list[val - 1] += 1

for val in boss_count_list:
  print(val)

Buggy python submission (verdict: Runtime Error):
n = int(input())
boss_list = list(map(int, input().split(" ")))

boss_list = sorted(boss_list, reverse=True)


for i in range(n, 0, -1):
    boss_num = 0
    boss_num = boss_list.index(i-1)
    # boss_list = boss_list[boss_num:]
    del boss_list[:boss_num]

    if i == 0:
        boss_num -= 1

    print(boss_num)

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

boss_count_list = [0] * n


for val in boss_list:
  boss_count_list[val - 1] += 1

for val in boss_count_list:
  print(val)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a_i = list(map(int,input().split(" ")))

def count_howmany_divide(val):
  result = 0

  while(True):
    if val % 2 != 0:
      break
    else:
      val /= 2
      result += 1

  return result
    

a_i_divided = list(map(count_howmany_divide, a_i))

print(min(a_i_divided))

Fixed submission:
a = input()
a_list = list(a)
print(a_list.count("1"))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a_i = list(map(int,input().split(" ")))

counter = 0

break_flag = False

while(True):
  for a_i_item in a_i:
    if a_i_item % 2 != 0:
      break_flag = True
      break
  
  a_i = list(map(lambda val: val / 2, a_i))

  if break_flag == True:
    break

  counter += 1

print(counter)

Fixed submission:
a = input()
a_list = list(a)
print(a_list.count("1"))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

a_i_list = []

push_i = 1
GOAL_i = 2

is_loop = False
pushed_i_list = []

push_counter = 0

for i in range(n):
  a_i_list.append(int(input()))


while (True):
  push_counter += 1

  pushed_i_list.append(push_i)

  push_i = a_i_list[push_i-1]

  if push_i in pushed_i_list:
    push_counter = -1
    break
  
  if push_i == GOAL_i:
    break


print(push_counter)

Fixed submission:
n = int(input())

a_i_list = []

push_i = 1
GOAL_i = 2

is_loop = False
pushed_i_list = []

push_counter = 0

for i in range(n):
  a_i_list.append(int(input()))

while (True):
  push_counter += 1

  # pushed_i_list.append(push_i)
  current_index = push_i - 1
  push_i = a_i_list[push_i - 1]
  
  # 一度使用したボタンは数値を0にする
  a_i_list[current_index] = 0

  if a_i_list[push_i - 1] == 0:
    push_counter = -1
    break
  
  if push_i == GOAL_i:
    break


print(push_counter)
Buggy python submission (verdict: Time Limit Exceeded):
_input = int(input())

power = 1

for i in range(1, _input + 1):
  power *= i

power %= 1000000007

print(power)

Fixed submission:
_input = int(input())

power = 1

for i in range(1, _input + 1):
  if power >= 1000000007:
    power %= 1000000007
  power *= i

power %= 1000000007

print(power)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()

for i in range(n):
    buka = a.count(str(i+1))
    print(buka)


Fixed submission:
import math
r = int(input())
print(2*math.pi*r)
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(M)]
num = [0,0,0]
for i in range(M):
    if N == 3 and sc[i][0] == 1 and sc[i][1] == 0 or N == 2 and sc[i][0] == 2 and sc[i][1] == 0: # or sc[i][1] == 0 and sc[i][0] == 2 and  #値が０かつそれが１００の位 or 値が０かつそれが１０の位かつ１００がない
        print("-1")
        exit()
    else:
        for j in range(M-1):
            if sc[i][0] == sc[j+1][0]:
                if sc[i][1] != sc[j+1][1]:
                    print("-1")
                    exit()
                else:
                    #if sc[i][1] not in num:
                    num[sc[i][0]-1] = sc[i][1]
            else:
                num[sc[i][0]-1] = sc[i][1]
NUM = num[0] * 100 + num[1] * 10 + num[2]
print(NUM)


Fixed submission:
s = int(input())
if s%2 == 0:
    print(int(s/2))
else:
    print(int(s/2+1))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
flag = 0
for i in range(n):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                flag =+ 1
print(flag)

Fixed submission:
n = int(input())
s = input()
flag = 0
for i in range(n-1):
    if i == n-2:
        break
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                flag += 1
print(flag)
Buggy python submission (verdict: Runtime Error):
import math
A,B = input().split()
A = int(A)
B = int(B)
lcm = int(A*B/math.gcd(A,B))
print(lcm)

Fixed submission:
import fractions
A,B = input().split()
A = int(A)
B = int(B)
lcm = int(A*B/fractions.gcd(A,B))
print(lcm)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a*b)% == 1:
    print('Odd')
else:
    print('Even')

Fixed submission:
a,b = map(int, input().split())
if (a*b)% 2 == 1:
    print('Odd')
else:
    print('Even')
Buggy python submission (verdict: Runtime Error):
H = input()
W = input()
mas = int(H)*int(W)
h = mas%2

if h==0:
    print(int(mas/2))
else:
    print(int((mas+1)/2))

Fixed submission:
list = ["1", "1", "1", "2", "1", "2", "1", "5", "2", "2", "1", "5", "1", "2", "1", "14", "1", "5", "1", "5", "2", "2", "1", "15", "2", "2", "5", "4", "1", "4", "1", "51"]
K = input()
a = int(K)-1
print(list[a])
Buggy python submission (verdict: Runtime Error):
1<= N and N<=100

N = input()
if N%2 ==0:
  n = N/2
else:
  n = N/2+1
  
print(int(n))

Fixed submission:
N = input()
N =int(N)

if 1<= N and N<=100:
    if N%2 ==0:
        n = N/2
    else:
        n = N/2+1
  
print(int(n))
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
def solve():
    n=int(stdin.readline())
    cnt=0
    for i in range(1,n+1):
        df=str(i)[0]
        dl=str(i)[-1]
        for j in range(i,n+1):   
            dfb=str(j)[0]
            dlb=str(j)[-1]
            if df==dlb and dl==dfb:
                if i==j:
                    cnt+=1
                else:
                    cnt+=2

    print(cnt)
solve()


Fixed submission:
from sys import stdin
def solve():
    n=int(stdin.readline())
    '''ln_n=len(str(n))
    cnt=9
    for i in range(11,n+1):
        s=str(i)
        if s[-1]=='0':
            continue
        ln=len(s)
        if ln==ln_n:
            if ln_n!=2:
                cnt+=int(s[1:-1])
            else:
                if int(s[::-1])<=n:
                    cnt+=1
        else:
            cnt+=10**(ln-2)
    print(cnt)'''
    d={}
    for i in range(1,n+1):
        s=str(i)
        if s[-1]!='0':
            k=(s[0],s[-1])
            d.setdefault(k,0)
            d[k]+=1
    cnt=0
    for i in d:
        for j in d:
            if i[0]==j[1] and i[1]==j[0]:
                cnt+=(d[i]*d[j])
    #print(d)
    print(cnt)
                
solve()
Buggy python submission (verdict: Runtime Error):
from collections import deafualtdict
n=int(input())
ar=list(map(int,input().split()))
d=defaultdict(int)
for i in ar:
  d[i]+=1
for i in range (1,n+1):
  if i in d.keys():
    print(d[i])
  else:
    print(0)


Fixed submission:
from collections import defaultdict
n=int(input())
ar=list(map(int,input().split()))
d=defaultdict(int)
for i in ar:
  d[i]+=1
for i in range (1,n+1):
  if i in d.keys():
    print(d[i])
  else:
    print(0)
Buggy python submission (verdict: Runtime Error):
A = input().split()
if A[0] == 2 or A[1] == 2:
    print(No)
else:
    print(Yes)

Fixed submission:
A = input().split()
A[0] = int(A[0])
A[1] = int(A[1])
if A[0] == 2 or A[1] == 2:
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
A,B = int(input().split())
if A == 2 or B == 2:
    print('No')
else:
    print('Yes')

Fixed submission:
A = input().split()
A[0] = int(A[0])
A[1] = int(A[1])
if A[0] == 2 or A[1] == 2:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 09:15:46 2020

@author: black
"""
def check(x):
    div = [1]
    for j in range(1, x):
        if (x)%(j+1) == 0:
            div.extend([j+1])
            if (i+1)%(j+1) == 0:
                div.extend([j+1])
    return len(div)




N = int(input())
ans = []

for x in range(1, N+1):
    if x%2 == 1:
        if check(x) == 8:
            ans.extend([x])


print(len(ans))

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 09:15:46 2020

@author: black
"""
def check(x):
    div = [1]
    for j in range(1, x):
        if (x)%(j+1) == 0:
            div.extend([j+1])
    return len(div)




N = int(input())
ans = []

for x in range(1, N+1):
    if x%2 == 1:
        if check(x) == 8:
            ans.extend([x])


print(len(ans))
Buggy python submission (verdict: Runtime Error):


N = int(input())
def checklen(A, B):
    return max(len(str(A)), len(str(B)))

ans = float("inf")
for i in range(1,round(N/2):
    if N % i == 0:
        m = round(N/i)
        ans = min(checklen(i, m), ans)
print(ans)

Fixed submission:

import math

N = int(input())
def checklen(A, B):
    return max(len(str(A)), len(str(B)))

ans = float("inf")
M = round(math.sqrt(N))
for i in range(1, M+1):
    if N % i == 0:
        m = round(N/i)
        ans = min(checklen(i, m), ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(x) for x in input().split()]
count = 0
for i in N-1:
  if i == 

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = [0]*n
for i in range(n-1):
    ans[a[i]-1] += 1
for i in range(n):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
N = int(input())
total = 0
for i in range(1, N+1):
  if （i%3) !=0 and (i%5) !=0:
    total += i
print(total)


Fixed submission:
N = int(input())
total = 0
for i in range(1, N+1):
  if (i%3) != 0 and (i%5) != 0:
    total =  total + i
print(total)
Buggy python submission (verdict: Runtime Error):
S = input()
print("Yes" if S[3] == S[4] and S[5] == S[6] else "No")


Fixed submission:
S = input()
print("Yes" if S[2] == S[3] and S[4] == S[5] else "No")

Buggy python submission (verdict: Runtime Error):
S = input()
print("Yes" if S[4] == S[5] and S[6] == S[7] else "No")

Fixed submission:
S = input()
print("Yes" if S[2] == S[3] and S[4] == S[5] else "No")
Buggy python submission (verdict: Runtime Error):
S = input()
print("Yes" len(set(S)) ==2 else "No")

Fixed submission:
S = input()
print("Yes" if len(set(S)) ==2 else "No")