Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
X = int(input())

if 400 <= X < 600:
    print(8)
elif 600 <= x < 800:
    print(7)
elif 800 <= x < 1000:
    print(6)
elif 1000 <= x < 1200:
    print(5)
elif 1200 <= x < 1400:
    print(4)
elif 1400 <= x < 1600:
    print(3)
elif 1600 <= x < 1800:
    print(2)
elif 1800 <= x < 2000:
    print(1)

Fixed submission:
x = int(input())

if 400 <= x < 600:
    print(8)
elif 600 <= x < 800:
    print(7)
elif 800 <= x < 1000:
    print(6)
elif 1000 <= x < 1200:
    print(5)
elif 1200 <= x < 1400:
    print(4)
elif 1400 <= x < 1600:
    print(3)
elif 1600 <= x < 1800:
    print(2)
elif 1800 <= x < 2000:
    print(1)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = list(map(int, input().split()))
    
    score = 1
    for a in A[:k]:
        score*=a
    
    for i in range(k,n):
        tmp_score = score//A[i-k] * A[i]
        if tmp_score > score:
            print("Yes")
        else:
            print('No')
        score = tmp_score
main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = list(map(int, input().split()))
    
    for i in range(k,n):
        if A[i] > A[i-k]:
            print('Yes')
        else:
            print('No')
main()

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

def main():
    n,k = map(int, input().split())
    A = list(map(int, input().split()))
    
    scores= []
    score = 1
    for a in A[:k]:
        score*=a
    scores.append(score)
    
    for i in range(k,n):
        score = score//A[i-k] * A[i]
        scores.append(score)
    
    for i in range(n-k):
        if scores[i] < scores[i+1]:
            print("Yes")
        else:
            print("No")
main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = list(map(int, input().split()))
    
    for i in range(k,n):
        if A[i] > A[i-k]:
            print('Yes')
        else:
            print('No')
main()
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = input()

print(1000 - N%1000)

Fixed submission:
import sys 
input = sys.stdin.readline

N = int(input())

if N % 1000 == 0:
  print(0)
else:
  print(1000 - N%1000)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = int(input())
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for _ in range(N):
  d[input()]+=1
  
for s in ['AC', 'WA', 'TLE', 'RE']:
  print(f'{s} X {d[s]}')

Fixed submission:

N = int(input())
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
 
for _ in range(N):
    s = input().strip()
    d[s]+=1

for k,v in d.items():
    print(k, 'x', v)
Buggy python submission (verdict: Runtime Error):
if X<29:
  print('No')
else:
  print('Yes')
    

Fixed submission:
X=int(input())
if X<30:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
import asyncio


async def main(input: list):
    possible575 = sorted(input) == [5, 5, 7]
    print(possible575)


input = list(map(int, input().split()))
asyncio.run(main(input))


Fixed submission:
def main(input: list):
    possible575 = sorted(input) == [5, 5, 7]
    print("YES" if possible575 else "NO")


input = list(map(int, input().split()))
main(input)
Buggy python submission (verdict: Runtime Error):
import math

N, D = list(map(int, input().split(' ').rstrip()))

cnt = 0
def check(p, q):
  r = p**2 + q**2
  return math.sqrt(r)

for i in range(N):
  p, q = list(map(int, input().split(' ').rstrip()))
  if check(p, q) <= D:
    cnt += 1

print(cnt)


Fixed submission:
import math
 
N, D = list(map(int, input().split(' ')))
 
cnt = 0
def check(p, q):
  r = p**2 + q**2
  return math.sqrt(r)
 
for i in range(N):
  p, q = list(map(int, input().split(' ')))
  if check(p, q) <= D:
    cnt += 1
 
print(cnt)
Buggy python submission (verdict: Runtime Error):
import sys
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
    if A[i]==o:
        print("0")
        sys.exit()
for i in range(N):
    pai=pai*A[i]
    if pai>10**18:
        print("-1")
        hantei=int(1)
        break
if hantei==0:
    print(pai)


Fixed submission:
import sys
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
    if A[i]==0:
        print("0")
        sys.exit()
for i in range(N):
    pai=pai*A[i]
    if pai>10**18:
        print("-1")
        hantei=int(1)
        break
if hantei==0:
    print(pai)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
    pai=pai*A[i]
if pai>10**18:
    print("-1")
    hantei=int(1)
if hantei==0:
    print(pai)


Fixed submission:
import sys
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
    if A[i]==0:
        print("0")
        sys.exit()
for i in range(N):
    pai=pai*A[i]
    if pai>10**18:
        print("-1")
        hantei=int(1)
        break
if hantei==0:
    print(pai)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()

counter = 0
while 'BW' in s:
    counter += s.count('BW')
    s = s.replace('BW', 'WB')

print(counter)

Fixed submission:
import re
s = input()
iter = re.finditer('W', s)
indices = [m.start(0) for m in iter]
cnt = len(indices)
total = sum(indices)
print(total - (cnt * (cnt -1)) // 2)
Buggy python submission (verdict: Runtime Error):
n = input()

search_list = [str(x) * 3 for x in range(1,10)]
for i in search_list:
    if i in n:
        print('Yes')
        break
else:
    print(No)

Fixed submission:
n = input()
search_list = [str(x) * 3 for x in range(0,10)]
for i in search_list:
    if i in n:
        print('Yes')
        break
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
c = [list(input().split()) for _ in range(2)]
if c[0][0] == c[1][2] and c[0][1] == c[1][1] and c[0][2] == c[1][0]:
    print('YES')
else: 
    print('No')

Fixed submission:
c = [list(input()) for _ in range(2)]
if c[0][0] == c[1][2] and c[0][1] == c[1][1] and c[0][2] == c[1][0]:
    print('YES')
else: 
    print('NO')
Buggy python submission (verdict: Runtime Error):
r, g = map(int, input().split())
print(int(g * 2 - r))

Fixed submission:
r, g = [int(input()) for _ in range(2)]
print(int(g * 2 - r))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b:
    print(c)
elce:
    print(b)

Fixed submission:
a, b, c = map(int, input().split())
if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)
Buggy python submission (verdict: Runtime Error):
n, a = [int(input) for _ in range(2)]
print(n*n - a)

Fixed submission:
n, a = [int(input()) for _ in range(2)]
print(n*n - a)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
if a == 'H':
    if b == 'H':
        print('H')
    elif b == 'D':
        print('D')
elif a == 'D':
    if b == 'H':
        print('D')
    elif b == 'D'
        print('H')

Fixed submission:
a, b = input().split()
if a == 'H':
    if b == 'H':
        print('H')
    elif b == 'D':
        print('D')
elif a == 'D':
    if b == 'H':
        print('D')
    elif b == 'D':
        print('H')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    pritn(c * d)
else:
    print(a * b)

Fixed submission:
a, b, c, d = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    print(c * d)
else:
    print(a * b)

Buggy python submission (verdict: Runtime Error):
a, b, c, b = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    pritn(c * d)
else:
    print(a * b)

Fixed submission:
a, b, c, d = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    print(c * d)
else:
    print(a * b)

Buggy python submission (verdict: Runtime Error):
a, b, c, b = map(int, input().split())
if a * b > c * b:
    print(a * b)
elif a * b < c * b:
    pritn(c * d)
else:
    print(a * b)

Fixed submission:
a, b, c, d = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    print(c * d)
else:
    print(a * b)

Buggy python submission (verdict: Runtime Error):
a, b, c, b = map(int, input().split())
if a * b > c * b:
    print(a * b)
elif a * b < c * b:
    pritn(c * b)
else:
    print(a * b)

Fixed submission:
a, b, c, d = map(int, input().split())
if a * b > c * d:
    print(a * b)
elif a * b < c * d:
    print(c * d)
else:
    print(a * b)
Buggy python submission (verdict: Runtime Error):
a op b = input().split()
if op == "+":
    print(int(a) + int(b))
elif op == '-':
    print(int(a) - int(b))

Fixed submission:
a, op, b = input().split()
if op == "+":
    print(int(a) + int(b))
elif op == '-':
    print(int(a) - int(b))
Buggy python submission (verdict: Runtime Error):
s = input().replace('AtCoder ').replace(' Contest')
print('A' + s[0] + 'C')

Fixed submission:
s = input().replace('AtCoder ','').replace(' Contest','')
print('A' + s[0] + 'C')
Buggy python submission (verdict: Runtime Error):
pack = list(map(int,input().split())).sort()
if pack[0] + pack[1] == pack[2]:
    print('Yes')
else:
    print('No')

Fixed submission:
pack = sorted(list(map(int,input().split())))
if pack[0] + pack[1] == pack[2]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())
print(int((a + b) * h / 2))

Fixed submission:
a, b, h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))

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

Fixed submission:
a, b, h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))

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

Fixed submission:
a, b, h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))

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

Fixed submission:
a, b, h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))
Buggy python submission (verdict: Runtime Error):
n, k, x, y = [int(iput()) for _ in range(4)]
print(k * x + (n-k) * y)

Fixed submission:
n, k, x, y = [int(input()) for _ in range(4)]
if n > k:
    print(k * x + (n-k) * y)
else:
    print(n * x)
Buggy python submission (verdict: Time Limit Exceeded):
# N体の敵、K回の必殺技
N, K = map(int, input().strip().split(' '))
N_list = list(map(int, input().strip().split(' ')))
sorted_N = sorted(N_list, reverse=True)

# 必殺技で体力が多い敵からヤる
for i in range(K):
  sorted_N.pop(0)
  if sorted_N == []:
    break

if sorted_N ==[]:
  print(0)
else:
  print(sum(sorted_N))

Fixed submission:
# N体の敵、K回の必殺技
N, K = map(int, input().strip().split(' '))
N_list = list(map(int, input().strip().split(' ')))
sorted_N = sorted(N_list, reverse=True)

# 必殺技で体力が多い敵からヤる
del sorted_N[:K]

if sorted_N ==[]:
  print(0)
else:
  print(sum(sorted_N))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

K, S = map(int, input().strip().split(' '))

X = range(K + 1)
Y = range(K + 1)
Z = range(K + 1)

count = 0
for i, j, k in itertools.product(X, Y, Z):
  if i + j + k == S:
    count += 1
print(count)

Fixed submission:
import itertools

K, S = map(int, input().strip().split(' '))
X = list(range(K + 1))
count = 0
for i, j in itertools.product(X, repeat=2):
  if 0 <= S - i - j <= K:
    count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

"""
整数K,S
2 <= K <= 2500, 0 <= S <= 3K

0 <= X,Y,Z <= K
X + Y + Z = Sを満たすX,Y,Zの割り当ては何通り？

"""
K, S = map(int, input().strip().split(' '))
X = list(range(K + 1))
Y = list(range(K + 1))
Z = list(range(K + 1))
count = 0

for i, j, k in list(itertools.product(X,Y,Z)):
  if i + j + k == S:
    count += 1
print(count)

Fixed submission:
import itertools

K, S = map(int, input().strip().split(' '))
X = list(range(K + 1))
count = 0
for i, j in itertools.product(X, repeat=2):
  if 0 <= S - i - j <= K:
    count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n, m, = map(int, input().split())
h = list(map(int, input().split()))
p = []
for i in range(m):
    a, b, = map(int, input().split())
    p.append([a-1, b-1])

#print("p = {}".format(p))

ret = 0
for i in range(n):
    # 自分の高さは？
    max_height = h[i]
    # 今のところ自分が高い
    flag = True

    for j in p:
        if j[0] == i:
            if max_height <= h[j[1]]:
                flag = False
                break
        elif j[1] == i:
            if max_height <= h[j[0]]:
                flag = False
                break
    if flag == True:
        ret += 1

print("{}".format(ret))

Fixed submission:
import copy

n, m, = map(int, input().split())
h = list(map(int, input().split()))
p = []
for i in range(m):
    a, b, = map(int, input().split())
    p.append([a-1, b-1])

#print("p = {}".format(p))

height = copy.copy(h)
for i in p:
    index0 = i[0]
    index1 = i[1]
    if h[index0] < h[index1]:
        height[index0] = -1
    elif h[index0] > h[index1]:
        height[index1] = -1
    elif h[index0] == h[index1]:
        height[index0] = -1
        height[index1] = -1

#print("height = {}".format(height))

ret = 0
for i in range(n):
    if height[i] == h[i]:
        ret += 1

print("{}".format(ret))
Buggy python submission (verdict: Runtime Error):
k, n = map(int, input().split())
a = list(map(int, input().split()))
a.sort()

zero = False
if 0 in a:
    a.remove(0)
    n = n - 1
    zero = True
    #print("contain 0.")

l1 = a[n-1] - a[0]  # 0を通らない側
l2 = a[0] + k - a[n-1]  # 0を通る側
if zero == True:
    ret = l2
else:
    ret = l1 if l1 < l2 else l2
print("{}".format(ret))

Fixed submission:
s = input()
ret = "No"
if s[2] == s[3] and s[4]==s[5]:
    ret = "Yes"
print("{}".format(ret))
Buggy python submission (verdict: Time Limit Exceeded):
a, b, m = map(int, input().split())
ax = list(map(int, input().split()))
bx = list(map(int, input().split()))
x = []
for i in range(m):
    _x = map(int, input().split())
    x.append(list(_x))

min_sum = 99999999
for i in range(a):
    for j in range(b):
        sum = ax[i] + bx[j]
        for k in x:
            sum2 = sum
            if k[0] == i+1 and k[1] == j+1:
                sum2 = sum2 - k[2]
            if sum2 < min_sum:
                min_sum = sum2

print("{}".format(min_sum))

Fixed submission:
a, b, m = map(int, input().split())
ax = list(map(int, input().split()))
bx = list(map(int, input().split()))
x = []
for i in range(m):
    _x = map(int, input().split())
    x.append(list(_x))

min_a = min(ax)
min_b = min(bx)
min_sum = min_a + min_b

for k in x:
    sum = ax[k[0]-1] + bx[k[1]-1] - k[2]
    if sum < min_sum:
        min_sum = sum

print("{}".format(min_sum))
Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
p = map(int, input().split())
pList = list(p)

aList = []
ret = "YES"
for i in range(num):
    if pList[i] in aList:
        ret = "NO"
        break
    aList.append(pList[i])

print("{}".format(ret))

Fixed submission:
# C - Distinct or Not
# https://atcoder.jp/contests/abc154/tasks/abc154_c

num = int(input())
p = list(map(int, input().split()))
list.sort(p)

ret = "YES"
for i in range(num-1):
    if p[i] == p[i+1]:
        ret = "NO"
        break

print("{}".format(ret))

Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
p = map(int, input().split())
pList = list(p)

ret = "YES"
for i in range(num):
    for j in range(i+1, num):
        if pList[i] == pList[j]:
            ret = "NO"
            break
    if ret == "NO":
        break

print("{}".format(ret))

Fixed submission:
# C - Distinct or Not
# https://atcoder.jp/contests/abc154/tasks/abc154_c

num = int(input())
p = list(map(int, input().split()))
list.sort(p)

ret = "YES"
for i in range(num-1):
    if p[i] == p[i+1]:
        ret = "NO"
        break

print("{}".format(ret))

Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
p = map(int, input().split())
pList = list(p)

ret = "YES"
for i in range(num):
    for j in range(i+1, num):
        if pList[i] == pList[j]:
            ret = "NO"
            break

print("{}".format(ret))

Fixed submission:
# C - Distinct or Not
# https://atcoder.jp/contests/abc154/tasks/abc154_c

num = int(input())
p = list(map(int, input().split()))
list.sort(p)

ret = "YES"
for i in range(num-1):
    if p[i] == p[i+1]:
        ret = "NO"
        break

print("{}".format(ret))
Buggy python submission (verdict: Time Limit Exceeded):
eneNum, spNum = map(int, input().split())
eneHp = map(int, input().split())
eneHpList = list(eneHp)

count = 0
for i in range(spNum):
    if len(eneHpList) > 0:
        maxEneHp = max(eneHpList)
        eneHpList.remove(maxEneHp)
count = sum(eneHpList)

print("{}".format(count))

Fixed submission:
eneNum, spNum = map(int, input().split())
eneHp = map(int, input().split())
eneHpList = list(eneHp)

# TLE
#count = 0
#for i in range(spNum):
#    if len(eneHpList) > 0:
#        maxEneHp = max(eneHpList)
#        eneHpList.remove(maxEneHp)

# new method
eneHpList.sort()
eneHpList.reverse()
del eneHpList[0:min([spNum, len(eneHpList)])]
count = sum(eneHpList)

print("{}".format(count))
Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

for i in range(num):
    check = True
    for j in range(i):
        if pList[i] >= pList[j]:
            check = False
            break
    if check == True:
        ret = ret + 1

print("{}".format(ret))

Fixed submission:
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

min = pList[0]
for i in range(num):
    if pList[i] <= min:
        min = pList[i]
        ret = ret + 1

print("{}".format(ret))
Buggy python submission (verdict: Time Limit Exceeded):
n, m, = map(int, input().split())

arr = []
for i in range(m):
    c = input().split()
    arr.append([(int)(c[0]), c[1]])
#print("{}".format(arr))

penalty_log = {}    # まだACでないWAはここに溜める
success_log = []    # 一度でも成功したACはここに溜める

for elem in arr:
    if elem[1] == 'WA':
        if elem[0] not in success_log:
            if elem[0] not in penalty_log:
                penalty_log[elem[0]] = 1
            else:
                penalty_log[elem[0]] += 1

    elif elem[1] == 'AC':
        if elem[0] not in success_log:
            success_log.append(elem[0])

#print("success_log = {}".format(success_log))
#print("penalty_log = {}".format(penalty_log))

success = len(success_log) # ACの個数
penalty = 0 # WAの個数
for k, v in penalty_log.items():
    if k in success_log:
        penalty += v
print("{} {}".format(success, penalty))

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

arr = []
for i in range(m):
    c = input().split()
    arr.append([(int)(c[0]), c[1]])
#print("{}".format(arr))

penalty_log = {}    # まだACでないWAはここに溜める
success_log = set([])    # 一度でも成功したACはここに溜める

for elem in arr:
    if elem[1] == 'WA':
        if elem[0] not in success_log:
            if elem[0] not in penalty_log:
                penalty_log[elem[0]] = 1
            else:
                penalty_log[elem[0]] += 1

    elif elem[1] == 'AC':
        if elem[0] not in success_log:
            success_log.add(elem[0])

#print("success_log = {}".format(success_log))
#print("penalty_log = {}".format(penalty_log))

success = len(success_log) # ACの個数
penalty = 0 # WAの個数
for k, v in penalty_log.items():
    if k in success_log:
        penalty += v
print("{} {}".format(success, penalty))
Buggy python submission (verdict: Runtime Error):
a = int(input())
print(a+pow(a,2)+pow(a,3)

Fixed submission:
a = int(input())
print(a+a*a+a*a*a)
Buggy python submission (verdict: Runtime Error):
N = int(input())
var = [str(input()) for i in range(N)]
judges = ['AC', 'WA', 'TLE', 'RE']
for j in judges:
    print('{} x {}'.format(j, (np.array(var) == j).sum()))

Fixed submission:
import numpy as np

N = int(input())
var = [str(input()) for i in range(N)]

judges = ['AC', 'WA', 'TLE', 'RE']
for j in judges:
    print('{} x {}'.format(j, (np.array(var) == j).sum()))
Buggy python submission (verdict: Runtime Error):
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(100000))

print(primes[list(np.array(primes) >= X).index(True)])

Fixed submission:
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(110000))

print(primes[list(np.array(primes) >= X).index(True)])

Buggy python submission (verdict: Runtime Error):
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(100000))

print(primes[list(np.array(primes) > X).index(True)])

Fixed submission:
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(110000))

print(primes[list(np.array(primes) >= X).index(True)])

Buggy python submission (verdict: Runtime Error):
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(10000))

print(primes[list(np.array(primes) > X).index(True)])

Fixed submission:
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(110000))

print(primes[list(np.array(primes) >= X).index(True)])
Buggy python submission (verdict: Runtime Error):
import numpy as np

N, K = list(map(int, input().split()))
R, S, P = list(map(int, input().split()))
T = str(input())

# マシンの出し手を整列させて、K分割してペア作成
# TODO: zero padding
num_split = (N + K - 1) // K
if N % K != 0:
    machine_arr = np.array(list(T) + ['0'] * (N % K)).reshape((-1, num_split), order='F')
else:    
    machine_arr = np.array(list(T)).reshape((-1, num_split), order='F')

ans = 0
for idx in range(machine_arr.shape[0]):
    orig_str = ''.join(machine_arr[idx].tolist())
    rep_str = orig_str.replace('rr', 'r').replace('ss', 's').replace('pp', 'p')
    point = rep_str.count('r') * P + rep_str.count('s') * R + rep_str.count('p') * S
    ans += point

print(ans)

Fixed submission:
import numpy as np

N, K = list(map(int, input().split()))
R, S, P = list(map(int, input().split()))
T = str(input())

ans = 0
for k in range(K):
    orig_str = T[k::K]
    rep_str = orig_str.replace('rr', 'r').replace('ss', 's').replace('pp', 'p')
    point = rep_str.count('r') * P + rep_str.count('s') * R + rep_str.count('p') * S
    ans += point

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
a, b = list(map(int, input().split()))
print(int(np.lcm(a, b)))

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

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
a, b = list(map(int, input().split()))
print(np.lcm(a, b))

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

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