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

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

min_money = 999999999

l=[]
for i in range(n):
	a=list(map(int,input().split()))
	l.append(a)

for i in range(2**n):
	bag = []
	for j in range(n):
		if ((i >> j) & 1):
			bag.append(l[j])

	money = 0
	skill = [0] * m
	enough = [0] * m
	for sub in bag:
		money += sub[0]
		for k in range(1,m+1):
			skill[k-1] += sub[k]
			if skill[k-1] >= x:
				enough[k-1] = 1

	if 0 not in enough and min_money > money:
		min_money = money

if min_money != 999999999:
	print(min_money)
else:
	print(-1)

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

min_money = 999999999999
for i in range(2**n):
	bag = []
	a = list(map(int,input().split()))
	for j in range(n):
		if ((i >> j) & 1):
			bag.append(a)

	money = 0
	skill = [0] * m
	enogh = [0] * m
	for sub in bag:
		money += sub[0]
		for k in range(1,m+1):
			skill[k-1] += sub[k]
			if skill[k-1] >= x:
				enough[k-1] = 1

	if 0 not in enough and min_money > money:
		min_money = money

if min_money != 999999999999:
	print(min_money)
else:
	print(-1)
Problem p02717 (python)

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

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

k = int(input())
q = deque(range(1, 10))

for i in range(k-1):
    # popをk-1回やる
    x = q.popleft()
    y = int(str(x)[-1])
    if y-1 >= 0:
        print(int(str(x)+str(y-1)))
        q.append(int(str(x)+str(y-1)))
    q.append(int(str(x)+str(x)[-1]))
    if y+1 < 10:
        q.append(int(str(x)+str(y+1)))

print(q[0])
Problem p02720 (python)

Fixed submission:
from collections import deque

k = int(input())
q = deque(range(1, 10))

for i in range(k-1):
    # popをk-1回やる
    x = q.popleft()
    y = int(str(x)[-1])
    if y-1 >= 0:
        q.append(int(str(x)+str(y-1)))
    q.append(int(str(x)+str(x)[-1]))
    if y+1 < 10:
        q.append(int(str(x)+str(y+1)))

print(q[0])

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

k = int(input())
q = deque(range(1, 10))

for i in range(k-1):
    # popをk-1回やる
    x = q.popleft()
    y = int(str(x)[-1])
    if y-1 >= 0:
        print(int(str(x)+str(y-1)))
        q.append(int(str(x)+str(y-1)))
    q.append(int(str(x)+str(x)[-1]))
    if y+1 < 10:
        q.append(int(str(x)+str(y+1)))

    print(q)
Problem p03071 (python)

Fixed submission:
# coding: utf-8
A, B = map(int, input().split())
if A == B:
    print(A * 2)
else:
    print(max(A, B) * 2 - 1)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max(a, b) * 2 - 1)
Problem p03085 (python)

Fixed submission:
base = input()
a = ['A', 'T']
b = ['G', 'C']
if base in a:
  print([a[0], a[1]][base == 'A'])
else:
  print([b[0], b[1]][base == 'G'])

Buggy submission (verdict: Runtime Error):
base = input()
a = ['A', 'T']
b = ['G', 'C']
if base in a:
  print([a[0], a[1]][if base == 'A'])
else:
  print([b[0], b[1]][if base == 'G'])
Problem p03386 (python)

Fixed submission:
# coding: utf-8
A, B, K = map(int, input().split())
ans = []
for i in range(K):
    a, b = A + i, B - i
    if a < b:
        ans.extend([a, b])
    elif a == b:
        ans.append(a)
    else:
        break
ans.sort()
for a in ans:
    print(a)

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


def main():
    A, B, K = map(int, input().split())
    for i in range(A, B + 1):
        if i < A + K or B - K < i:
            print(i)

    print(ans)

if __name__ == "__main__":
    main()
Problem p03408 (python)

Fixed submission:
# coding: utf-8
N = int(input())
S = {}
for _ in range(N):
    s = input()
    if s not in S:
        S[s] = 0
    S[s] += 1
M = int(input())
for _ in range(M):
    s = input()
    if s not in S:
        S[s] = 0
    S[s] -= 1
T = list(S.values())
T.append(0)
print(max(T))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
N = int(input())
S = {}
for _ in range(N):
    s = input()
    if s not in S:
        S[s] = 0
    S[s] += 1
M = int(input())
for _ in range(M):
    s = input()
    if s not in S:
        S[s] = 0
    S[s] -= 1
print(max(*S.values(), 0))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
from collections import defaultdict
N = int(input())
S = defaultdict(int)
for _ in range(N):
    S[input()] += 1
M = int(input())
for _ in range(M):
    S[input()] -= 1
print(max(*S.values(), 0))
Problem p03434 (python)

Fixed submission:
# coding: utf-8
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
print(sum(A[::2])-sum(A[1::2]))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
print(sum(A[::2])-sum([1::2]))
Problem p03455 (python)

Fixed submission:
# coding: utf-8
a, b = map(int, input().split())
print(['Odd', 'Even'][a % 2 == 0 or b % 2 == 0])

Buggy submission (verdict: Runtime Error):
# coding: utf-8
a, b = map(int, input().split())
print(['Odd', 'Even'][if a % 2 == 0 or b % 2 == 0])
Problem p03456 (python)

Fixed submission:
# coding: utf-8
S = int(input().replace(' ', ''))
print(['No', 'Yes'][S == int(S ** 0.5) ** 2])

Buggy submission (verdict: Runtime Error):
# coding: utf-8
S = int(input().replace(' ', ''))
print(['No', 'Yes'][if S == int(S ** 0.5) ** 2])
Problem p03481 (python)

Fixed submission:
# coding: utf-8


def main():
    X, Y = map(int, input().split())
    ans = 0
    while X <= Y:
        X *= 2
        ans += 1

    print(ans)

if __name__ == "__main__":
    main()

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


def main():
    X, Y = map(int, input().split())
    ans = 0
    while (X <= Y){
        x *= 2
        ans += 1
    }
    print(ans)

if __name__ == "__main__":
    main()
Problem p03796 (python)

Fixed submission:
# coding: utf-8
div = 10 ** 9 + 7
n = int(input())
ans = 1
for i in range(1, n + 1):
  ans = (ans * i) % div
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
div = 10 ** 9 + 7
n = int(input())
ans = 1
for i in range(1, N + 1):
  ans = (ans * i) % div
print(ans)
Problem p04012 (python)

Fixed submission:
# coding: utf-8
S = input()
cnt = {}
flg = True
for s in S:
  if s not in cnt:
    cnt[s] = 1
  else:
    cnt[s] += 1
for i in cnt.values():
  if i % 2 != 0:
    flg = False
print('Yes' if flg else 'No')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
S = input()
cnt = {}
flg = True
for s in S:
  if s in cnt:
    cnt[s] = 1
  else:
    cnt[s] += 1
for i in cnt.values():
  if j % 2 != 0:
    flg = False
print('Yes' if flg else 'No')
Problem p04019 (python)

Fixed submission:
# coding: utf-8

def main():
    S = input()
    dic = {'N':0, 'S':0, 'E':0, 'W':0}
    ans = 'No'

    for s in S:
        dic[s] += 1

    if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):
        if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):
            ans = 'Yes'

    print(ans)

if __name__ == "__main__":
    main()

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

def main():
    S = input()
    dic = {'N':0, 'S':0, 'E':0, 'W':0}
    ans = 'No'

    for s in S:
        dic[s] += 1

    if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):
        if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and mp['W'] > 0):
            ans = 'Yes'

    print(ans)

if __name__ == "__main__":
    main()
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
print((a*3+p)//2)

Buggy submission (verdict: Runtime Error):
a,p = map(int, input.split())
print((a*3+p) // 2)
Problem p02646 (python)

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

x = A + V * T
y = B + W * T

z = A - V * T
w = B - W * T

if A < B:
  if x >= y:
    print('YES')
  else:
    print('NO')
else:
  if z <= w:
    print('YES')
  else:
    print('NO')

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x = A + V * T
y = B + W * T

if X >= y:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x_oni = A + V * T
x_kodomo = B + W * T

if x_oni >= X_kodomo:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x_oni = A + V * T
x_kodomo = B + W * T

if x_oni == X_kodomo:
  print('YES')
else:
  print('NO')
Problem p02675 (python)

Fixed submission:
a = int(input())
if a%10 == 3:
  print('bon')
elif a%10 == 0 or a%10 ==1 or a%10 ==6 or a%10 ==8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
a = input()
if a%10 == 3:
  print('bon')
elif a%10 == 0 or a%10 ==1 or a%10 ==6 or a%10 ==8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
a = input()
if a%10 == 3:
  print('bon')
elif a%10 == 0 or 1 or 6 or 8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
a = input()
if a%10 == 3:
  print('bon')
elif a&10 == 0 or 1 or 6 or 8:
  print('pon')
else:
  print('hon')
Problem p02700 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
count_T = (c-1)//b + 1
count_A = (a-1)//d + 1

if count_T > count_A:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split)
count_T = (a-1)//b + 1
count_A = (c-1)//d + 1

if count_T <= count_A:
  print("Yes")
else:
  print("No")
Problem p02718 (python)

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

all_sum = sum(a)
standard = all_sum/(4*m)
ans = 0

for i in a:
  if i >= standard:
    ans += 1

if ans >= m:
  print('Yes')
else:
  print('No')

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

all_sum = sum(a)
standard = all_sum/(4*M)
ans = 0

for i in a:
  if i >= standard:
    ans += 1

if ans >= m:
  print('Yes')
else:
  print('No')

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

all_sum = sum(a)
standard = all_sum//(4*M)
ans = 0

for i in a:
  if i >= standard:
    ans += 1

if and >= m:
  print('Yes')
else:
  print('No')

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

all_sum = sum(a)
standard = all_sum//(4*M)
ans = 0

for i in a:
  if a[i] >= standard:
    ans += 1

if and >= m:
  print('Yes')
else:
  print('No')
Problem p02730 (python)

Fixed submission:
s = input()

n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first == s_first_reverse and s_second == s_second_reverse:
  print('Yes')
else:
  print('No')

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

n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first = s_first_reverse and s_second = s_second_reverse:
  print('Yes')
else:
  print('No')
Problem p02783 (python)

Fixed submission:
H, A = map(int, input().split())
n = (H-1)//A + 1
print(n)

Buggy submission (verdict: Runtime Error):
H, A = map(int, input())
n = (H-1)//A + 1
print(n)
Problem p02801 (python)

Fixed submission:
C = input()
print(chr(ord(C) + 1))

Buggy submission (verdict: Runtime Error):
C = input()
print chr(ord('C') + 1)
Problem p02811 (python)

Fixed submission:
K, X = map(int, input().split())
a = 500*K

if a >= X:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
K, X = map(int, input().split)
a = 500*K

if a >= X:
  print("Yes")
else:
  print("No")
Problem p02921 (python)

Fixed submission:
s = input()
t = input()

if s[0] == t[0] and s[1] == t[1] and s[2] == t[2]:
  print(3)
elif (s[0] == t[0] and s[1] == t[1]) or (s[1] == t[1] and s[2] == t[2]) or (s[2] == t[2] and s[0] == t[0]):
  print(2)
elif s[0] == t[0] or s[1] == t[1] or s[2] == t[2]:
  print(1)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

c = 0

for i in s:
  for j in t:
    if i == j and s[i] == t[j]:
      c += 1

print(c)
Problem p02945 (python)

Fixed submission:
A, B = map(int, input().split())
x = A+B
y = A-B
z = A*B

if B>=0:
  if x - z >= 0:
    print(x)
  else:
    print(z)
else:
  if y - z >= 0:
    print(y)
  else:
    print(z)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input()split())
x = A+B
y = A-B
z = A*B

if B>=0:
  if x - z >= 0:
    print(x)
  else:
    print(z)
else:
  if y - z >= 0:
    print(y)
  else:
    print(z)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input()split())
x = A+B
y = A-B
z = A*B

if y>=0:
  if x - z >= 0:
    print(x)
  else:
    print(z)
else:
  if y - z >= 0:
    print(y)
  else:
    print(z)
Problem p02957 (python)

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

if (A+B)%2 == 0:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

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

if (A+B)&2 == 0:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")
Problem p02993 (python)

Fixed submission:
s = input()

if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
  print('Good')
else:
  print('Bad')

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

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print('Bad')
else:
  print('Good')

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

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print('Bad')
else:
  print('Good')

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

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

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

if S[0] == S[1] or S[0] == S[2] or S[0] == S[3] or S[1] == S[2] or S[1] == S[3] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

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

if S[0] == S[1] or S [0] == S[2] or S[0] == S[3] or S[1] == S[2] or S[1] == S[3] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

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

if S[0] == S[1] or S [0] == S [2] or S[0] == S[3] or S[1] == S[2] or S[1] == S[3] or S[2] == S [3]:
  print('Bad')
else:
  print('Good')
Problem p03101 (python)

Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())

s = (H - h) * (W - w)

print(s)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
h, w = map(int input().split())

s = (H - h) * (W - w)

print(s)
Problem p03192 (python)

Fixed submission:
N = input()

c = N.count('2')

print(c)

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

c = N.count(2)

print(c)
Problem p03337 (python)

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

x = a + b
y = a - b
z = a * b

print(max([x, y, z]))

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

x = a + b
y = a - b
z = a * b

print(max[x, y, z])
Problem p03351 (python)

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

x = abs(a - b)
y = abs(b - c)
z = abs(c - a)

if z <= d:
  print('Yes')
elif x<= d and y <= d:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, inmput().split())

x = abs(a - b)
y = abs(b - c)
z = abs(c - a)

if z <= d:
  print('Yes')
elif x<= d and y <= d:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, inmput().split())

x = abs(a - b)
y = abs(b - c)
z = abs(c - a)

if z <= d:
  print('Yes')
elif if x<= d and y <= d:
  print('Yes')
else:
  print('No')
Problem p03455 (python)

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

r = a * b % 2

if r == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input(),split())

r = a * b % 2

if r == 0:
  print('Even')
else:
  print('Odd')
Problem p03543 (python)

Fixed submission:
n = input()

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
  print('Yes')
else:
  print('No')
Problem p03573 (python)

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

if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if a == b:
  input(c)
elif b == c:
  input(a)
else:
  input(b)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if a = b:
  input(c)
elif b = c:
  input(a)
else:
  input(b)
Problem p03636 (python)

Fixed submission:
s = input()

print(s[0]+str(len(s)-2)+s[-1])

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

print(s[0] +　str(len(s)-2) + s[-1])

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

print(s[0] +　str(len(s) -2) + s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
m = str(len(s) -2)

print(s[0] +　m + s[-1])
Problem p03852 (python)

Fixed submission:
c = input()

if c == 'a' or c == 'i' or  c == 'u' or c == 'e' or c == 'o':
  print('vowel')
else:
  print('consonant')

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

if c == a or c == i or  c == u or c == e or c == 0:
  print('vowel')
else:
  print('consonant')
Problem p03860 (python)

Fixed submission:
a = input()

initial_middle = a[8]

print('A'+ initial_middle +'C')

Buggy submission (verdict: Runtime Error):
a = input().split()

initial_middle = a[7]

print('A'+ initial_middle +'C')
Problem p04011 (python)

Fixed submission:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

f_normal = x * n
f_addition = x * k  + y * (n - k)

if n <= k:
  print(f_normal)
else:
  print(f_addition)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
x = int(input())
y = int(input())

f_normal = x * k
f_addition = f_formal + (n - k) * y

if n <= k:
  print(f_normal)
else:
  print(f_addition)
Problem p04043 (python)

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

if A + B + C == 17:
  if (A == 5 or 7) and (B == 5 or 7) and (C == 5 or 7):
    print('YES')
  else:
    print('NO')
else:
  print('NO')

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

if A + B + C == 17:
  if (A = 5 or 7) and (B = 5 or 7) and (C = 5 or 7):
    print('YES')
  else:
    print('NO')
else:
  print('NO')
Problem p02658 (python)

Fixed submission:
N = int(input())
ans = 1
A = list(map(int, input().split()))
flag = 0

for j in range(len(A)):
  if A[j] == 0:
    flag = 1
    ans = 0

if flag == 0:
  for i in range(N):
    ans = ans * A[i]
    if ans > 10 ** 18:
      break


if ans > 10 ** 18:
  print('-1')
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 1
A = list(map(int, input().split()))

for i in range(N):
  ans = ans * A[i]
  if ans = 0:
    break

if ans > 10 ** 18:
  print('-1')
else:
  print(ans)
Problem p02730 (python)

Fixed submission:
S = input()
ans = True
def isP(s):
    return s == s[::-1]

if not isP(S):
    ans = False
if not isP(S[:(len(S)//2)]):
    ans = False

if ans:
    print("Yes")
else:
    print("No")

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

def kaibunn_boolean(s):
  return s == s[::-1]

ans = true

if kaibunn_boolean(S) and kaibunn_boolean(S[:3]):
  ans = kaibunn_boolean(S)

if ans:
  print('Yes')
else:
  print('No')
Problem p03323 (python)

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

if(A - B > 1 or B - A > 1):
  print(':(')

if((A - B) == 0 or (A - B) == 1 or (B - A) == 0 or (B - A) == 1):
  print('Yay!')

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
A = i[0]
B = i[1]

if(A - B > 1 || B - A > 1):
  print(':(')

if((A - B) == 0 || (A - B) == 1 || (B - A) == 0 || (B - A) == 1):
  print('Yay!')
Problem p02641 (python)

Fixed submission:
X, N = map(int, input().split())
if N == 0:
    print(X)
elif N == 100:
    if X <= 50:
        print(0)
    else:
        print(101)

else:
    p = list(map(int, input().split()))
    abs_list = []
    re_list = []
    min = 1000
    min_index = 0

    for i in range(250):
        abs_list.append(-100+i)
    for j in p:
        abs_list.remove(j)
    for i in range(len(abs_list)):

        re_list.append(abs(abs_list[i] - X))
    for i in range(len(re_list)):
        if min > re_list[i]:
            min = re_list[i]
            min_index = i
    if re_list[min_index] > X:
        print(0)
    else:
        print(abs_list[min_index])

Buggy submission (verdict: Runtime Error):
X, N = map(int, input().split())
if N == 0 and N == 100:
    print(X)


else:
    p = list(map(int, input().split()))
    abs_list = []
    re_list = []
    min = 1000
    min_index = 0

    for i in range(100):
        abs_list.append(i + 1)
    for j in p:
        abs_list.remove(j)
    for i in range(len(abs_list)):

        re_list.append(abs(abs_list[i] - X))
    for i in range(len(re_list)):
        if min > re_list[i]:
            min = re_list[i]
            min_index = i
    print(abs_list[min_index])

Buggy submission (verdict: Runtime Error):
X, N = map(int, input().split())
if N == 0:
    print(X)


else:
    p = list(map(int, input().split()))
    abs_list = []
    re_list = []
    min = 1000
    min_index = 0

    for i in range(100):
        abs_list.append(i + 1)
    for j in p:
        abs_list.remove(j)
    for i in range(len(abs_list)):

        re_list.append(abs(abs_list[i] - X))
    for i in range(len(re_list)):
        if min > re_list[i]:
            min = re_list[i]
            min_index = i
    
    print(abs_list[min_index])

Buggy submission (verdict: Runtime Error):
X, N = map(int, input().split())
if N == 0:
    print(X)


else:
    p = list(map(int, input().split()))
    abs_list = []
    re_list = []
    min = 1000
    min_index = 0

    for i in range(100):
        abs_list.append(i + 1)
    for j in p:
        abs_list.remove(j)
    for i in range(len(abs_list)):

        re_list.append(abs(abs_list[i] - X))
    for i in range(len(re_list)):
        if min > re_list[i]:
            min = re_list[i]
            min_index = i
    print(abs_list[min_index])
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
num = 1
flag = 0
c=list(map(int, input().split()))
for i in c:
    if i == 0:
        flag = 1
        print("0")
if flag == 0:
    for i in c:
        num *= i
    if num > 1000000000000000000:
        print("-1")
    else:
        print(num)
Problem p03086 (python)

Fixed submission:
S = list(input())
F = ["A", "C", "G", "T"]
count = 0
max = 0
f = 0
for i in S:
    for j in F:
        if j == i:
            count += 1
    if max < count:

        max = count
    else:
        count = 0
        if max != 0:
            f = max
        max = 0
    
print(max if max > f else f)

Buggy submission (verdict: Runtime Error):
S = list(input())
F = ["A", "C", "G", "T"]
count = 0
max = 0
for i in S:
    for j in F:
        if j == i:
            count += 1
    if max < count:

        max = count
    else:
        count = 0
        f = max
        max = 0
print(max if max > f else f)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = int(input().split())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = int(input())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")