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

Fixed submission:
X, A = map(int, input().split(' '))
if X < A:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
X, A = map(int, input())
if X < A:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
X, A = int(input().split(''))
if X < A:
    print(0)
else:
    print(10)
Problem p03000 (python)

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

D = 0
count = 1

for l in L:
    D += l

    if D <= X:
        count += 1

    else:
        break

print(count)

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

D = 0
count = 1

for l in L:
    D += l

    if D <= X:
        count += 1

    else:
        breakXh

print(count)
Problem p03087 (python)

Fixed submission:
N, Q = map(int, input().split())
AC = [None] * N
flag_A = False
cnt = 0
for i, s in enumerate(input()):
    AC[i] = cnt
    if flag_A:
        if s == 'C':
            cnt += 1
            AC[i] = cnt
        flag_A = False

    if s == 'A':
        flag_A = True

for q in range(Q):
    l, r = map(int, input().split())
    print(AC[r-1] - AC[l-1])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
AC = [0 for _ in range(N)]
flag_A = False
for i, s in enumerate(input()):
    if flag_A:
        if s == 'C':
            AC[i-1] = 1
        flag_A = False

    elif s == 'A':
        flag_A = True

for q in range(Q):
    l, r = map(int, input().split())
    print(sum(AC[l-1:r-1:]))
Problem p02628 (python)

Fixed submission:
N,K=map(int,input().split())
price=list(map(int,input().split()))
price.sort()
price_K=price[:K]
j=0
for i in price_K:
  j+=i
print(j)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
price=list(map(int,input().split()))
price.sort(reverse=True)
price_N=price[:K]
j=0
for i in price_K:
	j+=i
print(j)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=input().split()
print(a*b)
Problem p02658 (python)

Fixed submission:
n = int(input())
x=1
a=list(map(int,input().split(" ")))
if(0 in a):
	print(0)
else:
	for i in a:
		x=x*i
		if(x==0):
			break
		if(x>=1000000000000000000):
			break
	if(x<=1000000000000000000):
		print(x)
	else:
		print(-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
x=1
a=list(map(int,input().split(" ")))
for i in a:
	x=x*i
    if(x==0):
		break
	if(x>=1000000000000000000):
		break
if(x<=1000000000000000000):
	print(x)
else:
	print(-1)
Problem p02641 (python)

Fixed submission:
X ,N = map(int,input().split())
P = list(map(int,input().split()))
if N == 0:
    print(X)
    exit(0)
A = list(range(0,102))
ans = 0
mins = 100


for a in A:
    if a not in P:
        if abs(a-X) < mins:
            mins = abs(a-X)
if (X - mins) not in P:
    print(X-mins)
else:
    print(X+mins)

Buggy submission (verdict: Runtime Error):
X ,N = map(int,input().split())
P = list(map(int,input().split()))
A = list(range(min(P),max(P)))
P.sort()
ans = 0
min = 100
if N == 0:
    print(X)
    exit(0)


for a in A:
    if a not in P:
        if abs(a-X) < min:
            min = abs(a-X)
            ans = a
print(ans)
Problem p02663 (python)

Fixed submission:
H_1,M_1,H_2,M_2,K = map(int,input().split())
if H_2 < H_1:
    H_2 += 24
MaxH = abs(H_2 - H_1)
if M_1 >= M_2:
    MaxM = M_2 - M_1
if M_1 < M_2:
    MaxM = abs(M_1 - M_2)
useTime = MaxH*60 + MaxM
useTime -= K
print(useTime)

Buggy submission (verdict: Runtime Error):
H_1,M_1,H_2,M_2,K = map(int,input().split())
MaxH = H_2 - H_1
if M_1 > M_2:
    MaxM = M_2 - M_1
if M_1 < M_2:
    MaxM = M_1 - M_2
useTime = MaxH*60 + MaxM
useTime -= K
print(useTime)
Problem p02664 (python)

Fixed submission:
#BBBBBBBBBBB

import sys
import math
import itertools
import collections
import heapq
import numpy as np

rl = sys.stdin.readline

t = rl()
li = []
for i in range(len(t)):
    if t[i] == '?':
        li.append('D')
    else:
        li.append(t[i])
print(''.join(li))

Buggy submission (verdict: Runtime Error):
#BBBBBBBBBBB
 
import sys
import math
import itertools
import collections
import heapq
import numpy as np
 
rl = sys.stdin.readline
 
t = rl()
li = []
for i in range(len(t)):
    if t[i] == '?':
        li.append('D')
    else:
        li.append(t[i])
print(''.join(li))
Problem p02683 (python)

Fixed submission:
import itertools
N,M,X = map(int,input().split())
A = [list(map(int,input().split())) for _ in range(N)]
B = list(itertools.product([0,1], repeat=N))
sums = {}
anss = []
for i in range(N):
    for b in B:
        ans = 0
        Point = [0]*M
        count = 0
        for z in b:
            if z == 1:
                for k in range(M):
                    Point[k] += A[count][k+1]
                ans += A[count][0]
                if M == len([Point[n] for n in range(M) if Point[n] >= X]):
                    anss.append(ans)
            count += 1
if len(anss) != 0:
    print(min(anss))
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
import numpy as np
N,M,X = map(int,input().split())
datas = []
point = [0]*M
m = 0
max = 0
count = 0
for i in range(N):
    datas.append(list(map(int,input().split())))
print(datas)
while 1:
    for data in datas:
        if sum(data[1:-1]) > max:
            ans = count
            max = sum(data[1:-1])
        count += 1
    for i in range(M):
        point[i] += datas[ans][i+1]
    m += datas[ans][0]
    if all([x >= 10 for x in point]):
        print(m)
        break
    datas.pop(ans)
    if len(datas) == 0:
        print(-1)
        break
    max,ans,count = 0,0,0
Problem p02694 (python)

Fixed submission:
X = int(input())
ans = 100
count = 0
while ans < X:
  ans = int(ans * 1.01)
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
X = int(input())
check = false
ans = 100
count = 0
while ans < X:
  ans *= 1.01
  count += 1
print(count)
Problem p02705 (python)

Fixed submission:
import numpy as np
R = int(input())
print(R*2*np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np
R = int(input())
print(R*2*np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np
R = int(input())
print(R*R*np.pi)
Problem p02717 (python)

Fixed submission:
def swap(A,B):
    a = A
    A = B
    B = a
    return A,B
X,Y,Z = map(int,input().split())
X,Y = swap(X,Y)
X,Z = swap(X,Z)
print(str(X)+' '+str(Y)+' '+str(Z))

Buggy submission (verdict: Runtime Error):
def swap(A,B):
    a = A
    A = B
    B = a
    return A,B
X,Y,Z = map(int,input().split())
X,Y = swap(X,Y)
X,Z = swap(X,Z)
print(f'{X} {Y} {Z}')

Buggy submission (verdict: Runtime Error):
def swap(A,B):
    a = A
    A = B
    B = a
    return A,B
X,Y,Z = map(int,input().split())
X,Y = swap(X,Y)
X,Z = swap(X,Z)
print(f'{X} {Y} {Z}')
Problem p02628 (python)

Fixed submission:
n, k = list(map(int, input().split()))
values = list(map(int, input().split()))
print(sum(sorted(values)[:k]))

Buggy submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))
values = list(map(int, input().split()))
print(sum(sorted(values)[:k])
Problem p02687 (python)

Fixed submission:
contest = input()
if "ARC" == contest:
  print("ABC")
else:
  print("ARC")

Buggy submission (verdict: Runtime Error):
contest = input()
if "ARC" == contest:
  print("ABC")
else
  print("ARC")
Problem p02969 (python)

Fixed submission:
r = int(input())
print(3*r*r)

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

print(3r*r)
Problem p02642 (python)

Fixed submission:
N = int(input())
nums = [i for i in map(int, input().split())]
nums = sorted(nums)
max = nums[-1]
dp = [1]*(max+1)
ans = 0

for i in range(len(nums)-1):
    p = nums[i]
    if dp[p] ==1:
        for q in range(max//p+1):
            dp[p*q]=0
        if nums[i] != nums[i+1]:
            ans+=1
if dp[max]==1:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
nums = [i for i in map(int, input().split())]
nums = sorted(nums)
first_num = nums[0]
branch_point = int(nums[-1]/2)
target_index = 0
target_num=0
answer=[]
first_flag=0
duplicate = [x for x in set(nums) if nums.count(x)>1]
while target_num<branch_point:
    target_num = nums[target_index]
    # if target_num == nums[target_index+1]:

    nums = [num for num in nums if num%target_num !=0]
    nums.append(target_num)
    if first_flag==1 and target_num ==first_num:
        break
    if first_flag==0:
        first_flag=1

for dup in duplicate:
    nums.remove(dup)

print(len(nums))
Problem p02641 (python)

Fixed submission:
import sys

input = sys.stdin.readline

def main():
    x, n = map(int, input().rstrip().split())
    if n == 0:
        print(x)
        sys.exit()
    else:
        p = list(map(int, input().rstrip().split()))
        if x > max(p):
            print(x)
            sys.exit()
        else:
            p_x = set(range(102))
            p_temp = set(p)
            p_diff = p_x - p_temp
            p_temp = list(p_diff)
            p_temp = sorted(p_temp)
            p_dir = []

        for i in range(len(p_temp)):
            p_dir.append(abs(p_temp[i] - x))
        print(p_temp[p_dir.index(min(p_dir))])
  
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline

def main():
    x, n = map(int, input().rstrip().split())
    if n == 0:
        print(x)
        sys.exit()
    else:
        p = list(map(int, input().rstrip().split()))
        if x > max(p):
            print(x)
            sys.exit()
        else:
            p_x = set(range(min(p), max(p)+1))
            p_temp = set(p)
            p_diff = p_x - p_temp
            p_temp = list(p_diff).sort()
            p_dir = []

        for i in range(len(p_temp)):
            p_dir.append(abs(p_temp[i] - x))
        print(p_temp[p_dir.index(min(p_dir))])
  
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline

def main():
    x, n = map(int, input().rstrip().split())
    if n == 0:
        print(x)
        sys.exit()
    else:
        p = list(map(int, input().rstrip().split()))
        if x > max(p):
            print(x)
            sys.exit()
        else:
            p_x = set(range(min(p),max(p)+1))
            p_temp = set(p)
            p_diff = p_x - p_temp
            p_temp = list(p_diff)
            p_dir = []

        for i in range(len(p_temp)):
            p_dir.append(abs(p_temp[i] - x))
        print(p_temp[p_dir.index(min(p_dir))])
  
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline

def main():
  x, n = map(int, input().rstrip().split())
  if n == 0:
    print(x)
    sys.exit()
  else:
    p = list(map(int, input().rstrip().split()))
	if x > max(p):
      print(x)
      sys.exit()
    else:
      p_x = set(range(max(p)+1))
      p_temp = set(p)
      p_diff = p_x - p_temp
      p_temp = list(p_diff)
      p_dir = []

      for i in range(len(p_temp)):
        p_dir.append(abs(p_temp[i] - x))
      print(p_temp[p_dir.index(min(p_dir))])
  
if __name__ == "__main__":
  main()
Problem p02642 (python)

Fixed submission:
from collections import Counter
import sys
n=int(input())
a=sorted(list(map(int,input().split())))
 
c=[1 for i in range(10**6+1)]
d = Counter(a)
s = list(set(a))
count = 0
if d[1] == 1:
  print(1)
  sys.exit()
elif d[1] >=2:
  print(0)
  sys.exit()
for x in s:
  t = x * 2
  while t <= 10 ** 6:
    c[t] = 0
    t += x
 
for x in a:
  if d[x] == 1 and c[x] == 1:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline

def main():
    n = int(input().rstrip())
    a = sorted(list(map(int, input().rstrip().split())))
    count = 0
    b = []
    for i in range(n):
      flag = True
      for x in b:
        if a[i] % x == 0:
          flag = False
          break
      if flag:
        for k in range(n):
          if i != k and a[i] % k ==0;
            flag = False
            break
      if flag:
        count += 1
        b.append(a[i])
    print(count)
  
if __name__ == "__main__":
    main()
Problem p03573 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, c = map(imput().split())
print(a if b == c else b if a == c else c)
Problem p03635 (python)

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

print((n-1)*(m-1))

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

print((n-1)*(m-1))

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

a = n - 1
b = m - 1

print(a * b)
Problem p03719 (python)

Fixed submission:
a, b, c = map(int, input().split())
print("Yes" if a <= c <= b else "No")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int(input().split()))
print("Yes" if a <= c <= b else "No")
Problem p03738 (python)

Fixed submission:
a = int(input())
b = int(input())
print("GREATER" if a > b else "LESS" if a < b else "EQUAL")

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
print("GREATER" if a > b else "LESS" if a < b else "EQUAL")
Problem p02705 (python)

Fixed submission:
import math
 
r=int(input())
k=math.pi
 
t=2*k*r
 
print(t)

Buggy submission (verdict: Runtime Error):
import math

r=int(input)

k=math.pi

l=2*k*r

print(l)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
c=a*b
if c%2 == o:
  print('Even')
else:
  print('Odd')
Problem p03456 (python)

Fixed submission:
a,b=map(str, input().split())
c=a+b
d=int(c)
k=0
for i in range(1,1001):
  if d==i**2:
    k=k+1
  else:
    k=k
if k>=1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b=map(str, input().split())
c=a+b
d=int(c)
k=o
for i in range(1,100):
  if d==i**2:
    k=k+1
  else:
    k=k
if k>=1:
  print('Yes')
else:
  print('No')
Problem p03477 (python)

Fixed submission:
a,b,c,d=map(int, input().split())
L=a+b
R=c+d
if L>R:
  print('Left')
elif L==R:
  print('Balanced')
else:
  print('Right')

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
L=a+b,R=c+d
if L>R:
  print('Left')
elif L==R:
  print('Balanced')
else:
  print('Right')
Problem p02694 (python)

Fixed submission:
X=int(input())
a=100
for i in range(1,10**18):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)
    break

Buggy submission (verdict: Runtime Error):
X=int(input())
a=100
for i in range(1,10**18):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)

Buggy submission (verdict: Runtime Error):
X=int(input())
a=100
for i in range(1,1000000000000000000):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)

Buggy submission (verdict: Runtime Error):
X=int(input())
a=100
import math
for i in range(1,1000000000000000000):
  a+=math.floor(0.01*a)
  if X<=a:
    print(i)
Problem p02705 (python)

Fixed submission:
R=int(input())
r=2*3.14159265358979*R
print(r)

Buggy submission (verdict: Runtime Error):
R=int,input()
r=2*3.14159265358979*R
print(r)

Buggy submission (verdict: Runtime Error):
R=input()
r=2*3.14159265358979*R
print(r)

Buggy submission (verdict: Runtime Error):
R=input()
import math
r=2*math.pi*R
print(r)

Buggy submission (verdict: Runtime Error):
R=input()
import math
r=2*math.pi*R
print(R)
Problem p02718 (python)

Fixed submission:
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=S/(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
if h>=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=S//(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
if h<M:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=S//(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=S/(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=1/(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=1/(4*M)
h=0
for i in range(len(A)):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
if M<h
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=1/(4*M)
h=0
for i in range(len(A)):
  if A[i]>=l:
    h+=1
  else:
    h+=0
if h=M:
  print("Yes")
else:
  print("No")
Problem p02724 (python)

Fixed submission:
X=int(input())
g=X//500
h=X-500*g
i=h//5
j=1000*g+5*i
print(j)

Buggy submission (verdict: Runtime Error):
X=int(input())
g=X//500
h=X-500*g
i=h//5
j=1000*g+5*i
input(j)

Buggy submission (verdict: Runtime Error):
X=int(input())
g=X//500
h=X-g
i=h//5
j=1000*g+5*i
input(j)
Problem p02642 (python)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int, input().split()))

sorted_A = sorted(A)
result = 0
c = Counter(sorted_A)
# 倍数を管理するテーブル
lendp = sorted_A[-1] + 1
dp = [0] * lendp

for a in sorted_A:
    dp[a] += 1
    if dp[a] == 1:
        b = a * 2
        while b < lendp:
            dp[b] += 2
            b += a

print(dp.count(1))

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

setA = set(A)
result = 0

if N == 1:
    print(0)
else:
    for i in range(N):
        tmp = A[i]
        A[i] = 0
        setA = set(A)
        A[i] = tmp
        if 1 in setA:
            continue

        for a in setA:
            if A[i] % a == 0:
                break
        else:
            result += 1

    print(result)
Problem p02647 (python)

Fixed submission:
import numpy as np
from numba import njit
N, K = map(int, input().split())
A = np.array(list(map(int, input().split())), dtype=np.int64)


@njit
def solve(N, K, A):
    # 一度照らされると二度目以降は確実に照らされるはず。
    for i in range(K):
        # j番目の電球を操作
        B = np.zeros(N + 1, dtype=np.int64)
        for j in range(N):
            # 左辺を確認
            B[max(j - A[j], 0)] += 1
            # 右辺を確認(なんで-1?)
            B[min(j + A[j] + 1, N)] -= 1

        A = np.cumsum(B)[:-1]

        if np.all(A == N):
            return A

    else:
        return A


A = solve(N, K, A)
for i in range(N):
    if i != (N - 1):
        print(A[i], end=" ")
    else:
        print(A[i])

Buggy submission (verdict: Runtime Error):
import copy
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

for i in range(K):
    # j番目の電球を操作
    B = [0] * N
    for j in range(N):
        maxA = int(j + A[j] + 0.5)
        minA = math.ceil(j - A[j] - 0.5)

        for k in range(max(0, minA), min(N + 1, maxA + 1)):
            B[k] += 1
    A = copy.copy(B)

for i in range(N):
    if i != (N - 1):
        print(A[i], end=" ")
    else:
        print(A[i])
Problem p02660 (python)

Fixed submission:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


N = int(input())

primes = prime_factorize(N)

num = 0
hist = [1]
c = 1

tmp = 1
for p in primes:
    # 前回と異なる場合
    if tmp != p:
        c = 1
    tmp = p
    c *= p
    if c not in hist:
        hist.append(c)
        num += 1
        c = 1
print(num)

Buggy submission (verdict: Runtime Error):
import collections


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


N = int(input())

primes = prime_factorize(N)


num = 0
hist = []
c = primes[0]
for p in primes:
    if c not in hist:
        hist.append(c)
        num += 1
        c = 1
    c *= p

print(num)
Problem p02717 (python)

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

X, Y = Y, X
X, Z = Z, X

print(X, Y, Z)

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

sumA = sum(A)

filteredA = list(filter(lambda x: x < (sumA / (4*M)), A))

if M <= len(filteredA):
    print('Yes')
else:
    print("No")
Problem p02760 (python)

Fixed submission:
# 途中
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

A = A1 + A2 + A3
N = int(input())

index = []
for i in range(N):
    inp = int(input())
    if inp in A:
        index.append(A.index(inp))

if \
   (0 in index and 3 in index and 6 in index) or \
   (1 in index and 4 in index and 7 in index) or \
   (2 in index and 5 in index and 8 in index) or \
   (0 in index and 4 in index and 8 in index) or \
   (2 in index and 4 in index and 6 in index) or \
   (0 in index and 1 in index and 2 in index) or \
   (3 in index and 4 in index and 5 in index) or \
   (6 in index and 7 in index and 8 in index):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

A = A1 + A2 + A3
N = int(input())

index = []
for i in range(N):
    index.append(A.index(int(input())))

if (0 in index and 3 in index and 6 in index) or \
   (1 in index and 4 in index and 7 in index) or \
   (2 in index and 5 in index and 8 in index) or \
   (0 in index and 4 in index and 8 in index) or \
   (2 in index and 4 in index and 6 in index) or \
   (3 in index and 4 in index and 5 in index) or \
   (6 in index and 7 in index and 8 in index):
    print("Yes")
else:
    print("No")
Problem p02765 (python)

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

if N >= 10:
    rate = R
else:
    rate = R + (100 * (10 - N))

print(rate)

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

mmod = 10**9 + 7


def comb_mod(n, r, mod=mmod):
    nume = 1
    deno = 1

    r = min(r, r - 1)

    for i in range(1, r + 1):
        nume = (nume * (n - i)) % mod
        deno = (deno * (i + 1)) % mod

    return (nume * pow(deno, mod - 2, mod)) % mod


if n == 2:
    print(0)
    exit

total = (pow(2, n, mmod) - comb_mod(n, a) - comb_mod(n, b) - 1) % mmod

print(total)
Problem p03434 (python)

Fixed submission:
def li():
    return list(map(int, input().split()))


def mi():
    return map(int, input().split())


def ii():
    return int(input())


N = ii()
a = li()

a.sort(reverse=True)

alice = 0
bob = 0

for i in range(len(a)):
    if i % 2 == 0:
        alice += a[i]
    else:
        bob += a[i]

print(alice - bob)

Buggy submission (verdict: Runtime Error):
4
20 18 2 18
Problem p03624 (python)

Fixed submission:
S = input()

alpha = [chr(i) for i in range(97, 97+26)]

remain = list(set(alpha) - set(S))

if remain == []:
    print("None")
else:
    remain.sort()
    print(remain[0])

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

alpha = [chr(i) for i in range(97, 97+26)]

remain = list(set(alpha) - set(S))
remain.sort()
print(remain[0])
Problem p03827 (python)

Fixed submission:
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

N = ii()
S = input()

current = 0
maxx = 0
for s in S:
    if s == "I":
        current += 1
    else:
        current -= 1
    maxx = max(maxx, current)

print(maxx)

Buggy submission (verdict: Runtime Error):
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

N = ii()
S = input()

current = 0
maxx = 0
for s in S:
    if s == "I":
        current += 1
    else:
        current -= 1
    maxx = max(maxx, current)

print(result)