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

Fixed submission:
S = input()
ans = []

for i in range(len(S)):
    ans.append("x")

print("".join(ans))

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

ans = []

for i in range(1,len(s)):
    ans.append("x")

print("".join(ans))

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

ans = []

for i in range(len(s)):
    ans.append("x")

print("".join(ans))
Problem p02801 (python)

Fixed submission:
# A - Next Alphabet
# https://atcoder.jp/contests/abc151/tasks/abc151_a

print(chr(ord(input())+1))

Buggy submission (verdict: Runtime Error):
# C - Welcome to AtCoder
# https://atcoder.jp/contests/abc151/tasks/abc151_c

n,m = map(int,input().split())
submits = [list(input().split()) for i in range(0,m)]

ac = 0
wa = 0

AC = "AC"
WA = "WA"

tmp_wa = 0
tmp_ac = 0


for i in range(len(submits)):
    # ACなら正解数をカウントアップ
    if submits[i][1] == AC:
        # 同じ問題に正解してないかチェック
        if submits[i][0] == tmp_ac:
            tmp_ac = submits[i][0]
            continue
        ac += 1
        # WAの数をカウント
        wa += tmp_wa
        # WAを初期化
        tmp_wa = 0
        tmp_ac = submits[i][0]
    else:
        # WAならwa+1
        tmp_wa += 1

print(str(ac) + " " + str(wa))

Buggy submission (verdict: Runtime Error):
# C - Welcome to AtCoder
# https://atcoder.jp/contests/abc151/tasks/abc151_c

n,m = map(int,input().split())
submits = [list(input().split()) for i in range(0,m)]

ac = 0
wa = 0

AC = "AC"
WA = "WA"

tmp_wa = 0
tmp_ac = 0


for i in range(len(submits)):
    # ACなら正解数をカウントアップ
    if submits[i][1] == AC:
        # 同じ問題に正解してないかチェック
        if submits[i][0] == tmp_ac:
            continue
        ac += 1
        # WAの数をカウント
        wa += tmp_wa
        # WAを初期化
        tmp_wa = 0
        tmp_ac = submits[i][0]
    else:
        # WAならwa+1
        tmp_ac = submits[i][0]
        tmp_wa += 1

print(str(ac) + " " + str(wa))
Problem p03456 (python)

Fixed submission:
# B - 1 21
# https://atcoder.jp/contests/abc086/tasks/abc086_b

import sys

a,b = input().split()

c = int(a + b)

i = 0

while i <= 10000:
    if (i * i) == c:
        print("Yes")
        sys.exit()

    i = i + 1

print("No")

Buggy submission (verdict: Runtime Error):
# B - 1 21
# https://atcoder.jp/contests/abc086/tasks/abc086_b

a,b = input().split()

c = int(a + b)

i = 0

while i != -1 and c != i:
    if (i * i) == c:
        print("Yes")
        return
    i = i + 1

print("No")
Problem p03457 (python)

Fixed submission:
N = int(input())
count = 0
T, X, Y = 0, 0, 0
for i in range(N):
    t, x, y = map(int, input().split())
    if abs(x-X)+abs(y-Y) <= t-T and t % 2 == (x+y) % 2:
        count += 1
    T, X, Y = t, x, y
print("Yes" if count == N else "No")

Buggy submission (verdict: Runtime Error):
# C - Traveling
# https://atcoder.jp/contests/abc086/tasks/arc089_a

# dt = ti+1 −ti
# dist = abs(xi+1 − xi)+abs(yi+1 − yi)

# キーポイント: パリティ
# x + y は毎秒ごとに必ず偶奇が入れ替わる。

n = int(input())

T = 0
X = 0
Y = 0

cnt = 0

for i in range(n):
    t,x,y= map(int,input().split())

    if abs(X-x) + abs(Y-y)　<= (T-t) and (x+y)%2 == t%2:
        cnt += 1
    T,X,Y = t,x,y
print("Yes" if cnt == N else "No")
Problem p03494 (python)

Fixed submission:
N = int(input())

nums = list(map(int,input().split()))

i = 0

while 1 != 0:
    new = [(num/2) for num in nums if (num%2) == 0]

    if len(new) != N:
        print(i)
        exit()
    else:
        i += 1
        nums = new

Buggy submission (verdict: Runtime Error):
# B - Shift only
# https://atcoder.jp/contests/abc081/tasks/abc081_b

N = input()
nums = list(map(int,input().split()))

count= 0

while all(a % 2 == 0 for num in nums):
    nums = [(num/2) for num in nums]
    count +=  1

print(count)

Buggy submission (verdict: Runtime Error):
# B - Shift only
# https://atcoder.jp/contests/abc081/tasks/abc081_b

N = input()
nums = list(map(int,input().split()))

count= 0

while all(a % 2 == 0 for num in nums):
    num = [(num/2) for num in nums]
    count +=  1

print(count)
Problem p04043 (python)

Fixed submission:
# A - 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
# https://atcoder.jp/contests/abc042/tasks/abc042_a

nums = list(map(int,input().split()))

for i in [5,7,5]:
    if i in nums:
        nums.remove(i)
    else:
        print("NO")
        exit()

if len(nums) == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, K = map(int, input().split())
# 文字列用のリスト　インプットをブランクで区切りリスト化
k = input()
s = [int(j) for j in k.split(" ")]
valIn = 0
# Nの桁毎の分解
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []

def irohacheck(n):
	global valIn
	valIn = 0
	# 分解した数値をリストにして格納
	num = digit(n)
	# num内の数字がsに含まれる場合には、valInをインクリメント
	for i in range(len(num)):
		if s.count(num[i])>0:
			valIn+=1

irohacheck(N)
while(valIn != 0):
	N += 1
	irohacheck(N)
print(N)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, K = map(int, input().split())
# 文字列用のリスト　インプットをブランクで区切りリスト化
k = input()
s = [int(j) for j in k.split(" ")]
valIn = 0
# Nの桁毎の分解
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []

def irohacheck(n):
	global valIn
	valIn = 0
	# 分解した数値をリストにして格納
	num = digit(n)
	# num内の数字がsに含まれる場合には、valInをインクリメント
	for i in range(len(num)):
		if s.count(num[i])>0:
			valIn+=1

irohacheck(N)
while(valIn != 0):
	N += 1
	irohacheck(N)
print(N)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, K = map(int, input().split())
# 文字列用のリスト　インプットをブランクで区切りリスト化
k = input()
s = [int(j) for j in k.split(" ")]
valIn = 0
# Nの桁毎の分解
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []

def irohacheck(n):
	global valIn
	valIn = 0
	# 分解した数値をリストにして格納
	num = digit(n)
	# num内の数字がsに含まれる場合には、valInをインクリメント
	for i in range(len(num)):
		if s.count(num[i])>0:
			valIn+=1

irohacheck(N)
while(valIn != 0):
	N += 1
	irohacheck(N)
print(N)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, K = map(int, input().split())
# 文字列用のリスト　インプットをブランクで区切りリスト化
k = input()
s = [int(j) for j in k.split(" ")]
valIn = 0
# Nの桁毎の分解
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []

def irohacheck(n):
	global valIn
	valIn = 0
	# 分解した数値をリストにして格納
	num = digit(n)
	# num内の数字がsに含まれる場合には、valInをインクリメント
	for i in range(len(num)):
		if s.count(num[i])>0:
			valIn+=1

irohacheck(N)
while(valIn != 0):
	N += 1
	irohacheck(N)
print(N)

Buggy submission (verdict: Runtime Error):
# C - こだわり者いろはちゃん
# https://atcoder.jp/contests/abc042/tasks/arc058_a

# 入力 1
# 1000 8
# 1 3 4 5 6 7 8 9

N,K = input().split()
D = input().split()

one_to_ten = ["0","1","2","3","4","5","6","7","8","9","10"]
can_use = sorted(list(set(one_to_ten) - set(D)))

print(can_use)
tmp = []

for n in N:
    i = 0
    if n in can_use:
        tmp.append(n)
    else :
        tmp.append(can_use[0])
    i = i + 1
    
print("".join(tmp))
Problem p02700 (python)

Fixed submission:
import math
A,B,C,D = map(int,input().split())
if (math.ceil(A/D)) >= (math.ceil(C/B)) : print("Yes") #小数点切り上げ
else : print("No")

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
for num in range(0,):
    aoki = C - B
    taka = A - D
    if (aoki or taka) <= 0 : break
    else : pass

#print(aoki,taka)
if aoki <= 0 : print("Yes")
elif taka <= 0 : print("No")
Problem p02718 (python)

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A) #総得票数
A.sort(reverse = True) #票数の大きい順に並べる
if A[M-1] >= S / (4*M) : print("Yes") #この条件より大きい要素が(M-1)個あれば題意を満たす
else :print("No")

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split()) #nは総数、ｍは選ぶ数
a = map(int,input().split()) #aは得票数
G = sum(a) #総得票数
num = 1/(4*G)
s = 
yesman = 0
while a(:n)
if s >= num:
  yesman = yesman + 1
  
if yesman >= m:
  print("Yes")
else : print("No")
Problem p02724 (python)

Fixed submission:
money = int(input())
happy1 = money//500
happy2 = (money-happy1*500)//5
print(happy1*1000+happy2*5)

Buggy submission (verdict: Runtime Error):
money = input()
happy = money//500+(money-money//500)//5
print(happy)
Problem p02994 (python)

Fixed submission:
N,L = map(int,input().split())
deri = [L]
for num in range(1,N):
    num2 = L + num
    deri.append(num2)

deri.sort() #おいしさの小さい順に並び替え
if (0 in deri) == True:
    deri.remove(0) #remove Zero
elif sum(deri) < 0:
    del deri[-1]
else:
    del deri[0]

deru = sum(deri)
print(deru)

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
deri = [L]
deru = []
for num in range(1,N):
    num2 = L + num
    deri.append(num2)

for n in deri[0:]:
    if n <= 0 : deru.append(n*(-1))
    elif n >= 0 : deru.append(n)
    else : deru.append(0)

deru.sort()
rmv = deru.pop(0)
deri.remove(rmv)
out = sum(deri)
print(out)
Problem p02717 (python)

Fixed submission:
x,y,z = list(map(int,input().split()))
 
def swap(a,b):
    tmp = a
    a = b
    b = tmp
    return (a,b)
 
x,y = swap(x,y)
x, z = swap(x, z)
print(x,y,z)

Buggy submission (verdict: Runtime Error):
a = input("enter sth for a: ")
b = input("enter sth for b: ")
c = input("enter sth for c: ")

a1=a
b1 = b
c1= c
a = c1
b = a1
c = b1
print(f"valuse after reverse:{a}")
print(f"valuse after reverse:{b}")
print(f"valuse after reverse:{c}")

Buggy submission (verdict: Runtime Error):
#for the user_input 
a = input("enter sth for a: ")
b = input("enter sth for b: ")
c = input("enter sth for c: ")
#create temporary var to keep the user_input
a1=a
b1 = b
c1= c
#set the place for the input after swap
a = c1
b = a1
c = b1
#print out the final output
print(f"valuse after reverse:{a}")
print(f"valuse after reverse:{b}")
print(f"valuse after reverse:{c}")

Buggy submission (verdict: Runtime Error):
a = input("enter sth for a: ")
b = input("enter sth for b: ")
c = input("enter sth for c: ")

a1=a
b1 = b
c1= c
a = c1
b = a1
c = b1
print(f"valuse after reverse:{a}")
print(f"valuse after reverse:{b}")
print(f"valuse after reverse:{c}")

Buggy submission (verdict: Runtime Error):
A = input("enter number for A: ")
B = input("enter number for B: ")
C = input("enter number for C: ")

a1 = A
b1 = B
c1 = C
a = c1
b = a1
c = b1
print(f"valuse after reverse A = {a}")
print(f"valuse after reverse B= {b}")
print(f"valuse after reverse C= {c}")

Buggy submission (verdict: Runtime Error):
a = int(input("enter something: "))
print(a[::-1])
Problem p02718 (python)

Fixed submission:
n,m = map(int,input().split())
a = list(map(int, input().split()))
popular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))
print("Yes" if len(popular) >= m else "No")

Buggy submission (verdict: Runtime Error):
vote = input("Enter the vote: ")
if
Problem p02657 (python)

Fixed submission:
list = input().rstrip().split(' ')
a = int(list[0])
b = int(list[1])
print(a*b)

Buggy submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

n = int(input().rstrip())
nums = map(int,input().rstrip().split(' '))

ans = reduce(mul, nums)

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

n = int(input().rstrip())
nums = map(int,input().rstrip().split(' '))

print(reduce(mul, nums))
Problem p02657 (python)

Fixed submission:
i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
c = i[0]*i[1]
print(c)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
c = int(1)
N = int(input())
A = [int(x) for x in input().split()]
for k in range(N):
    c*=A[k]
if c>10**18:
    print(-1)
else:
    print(c)

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
C = i[0]*i[1]
print(c)
Problem p02853 (python)

Fixed submission:
s = 0
for i in map(int, raw_input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

Buggy submission (verdict: Runtime Error):
a = 0 
for i in map(int, raw_input().split()):
  if i == 1:
  	a+=300000
  elif i == 2:
  	a+=200000
  elif i == 3:
  	a+=100000
if a == 600000:
   a =  1000000
print(a)
Problem p02705 (python)

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

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

Buggy submission (verdict: Runtime Error):
r = int(input())
print(2*pi*r)
Problem p02706 (python)

Fixed submission:
n,m = map(int,input().split())
try:
  a = list(map(int,input().split()))
  b = int(sum(a))
except EOFError:
  pass
if int(n-b)<0:
  print('-1')
else:
  print(int(n-b))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [map(int,input().split()) for i in range(m)]
b = sum(a)
if n-a<0:
  print('-1')
else:
  print(int(n-a))
Problem p02718 (python)

Fixed submission:
n,m = map(int,input().split())
l = list(map(int,input().split()))
cnt = 0
for i in l:
  if i >= sum(l)/(4*m):
    cnt += 1
if cnt >= m:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
l = list(int(input() for i in range(1,n+1)))
cnt = 0
for j in range(0,n):
  if l[j]/(sum(l)) >= 1/(4*m):
    cnt += 1
if cnt >= m:
  print('Yes')
else:
  print('No')
Problem p02730 (python)

Fixed submission:
s = str(input())
n = len(s)
s1 = s[:int((n-1)/2)]
if s != s[::-1] or s1 != s1[::-1]:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
s = str(input())
n = len(s)
s1 = s[:(n-1)/2]
if s != s[::-1] or s1 != s1[::-1]:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
s = str(input())
n = len(s)
if ((n+1)/2)%2 != 0:
  if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[((n-1)/2)-j] for j in range(1,(n+3)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+3)/4)):
    print('Yes')
  else:
    print('No')
else:
  if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[(n-2*j-1)/2] for j in range(1,(n+1)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+1)/4)):
    print('Yes')
  else:
    print('No')
Problem p02760 (python)

Fixed submission:
a = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]

for i in range(3):
    for j in range(3):
        for k in range(n):
            if a[i][j] == b[k]:
                a[i][j] = 0

ans = "No"
for i in range(3):
    if a[i][0] + a[i][1] + a[i][2] == 0:
        ans = "Yes"
    if a[0][i] + a[1][i] + a[2][i] == 0:
        ans = "Yes"
if a[0][0] + a[1][1] + a[2][2] == 0:
    ans = "Yes"
if a[0][2] + a[1][1] + a[2][0] == 0:
    ans = "Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
n = int(input())
for i in range(1,n+1):
  b_i = int(input())
for j in range(1,n+1):
  d = [" " if b_j in s else s for s in a]
  e = [" " if b_j in s else s for s in b]
  f = [" " if b_j in s else s for s in c]
if d[0]==d[1]==d[2] or e[0]==e[1]==e[2] or f[0]==f[1]==f[2] or d[0]==e[0]==f[0] or d[1]==e[1]==f[1] or d[2]==e[2]==f[2] or d[0]==e[1]==f[2] or d[2]==e[1]==f[0]:
  print('Yes')
else:
  print('No')
Problem p02772 (python)

Fixed submission:
n = int(input())
try:
  a = list(map(int,input().split()))
  a1 = list(i for i in a if i%2==0)
  a2 = list(i for i in a1 if i%3!=0)
  a3 = list(i for i in a2 if i%5!=0)
except EOFError:
  pass
if len(a3) == 0:
  print('APPROVED')
else:
  print('DENIED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [map(int,input().split()) for i in range(n)]
b = [i for i in a if i%2==0]
c = [i for i in b if i%3!=0]
d = [i for i in c if i%5!=0]
if len(d)==0:
  print('APPROVED')
else:
  print('DENIED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int(input().split()) for i in range(n))
a1 = [i for i in a if i%2==0]
a2 = [i for i in a1 if i%3!=0]
a3 = [i for i in a2 if i%5!=0]
if len(a3)==0:
  print('APPROVED')
else:
  print('DENIED')
Problem p02783 (python)

Fixed submission:
h,a = map(int,input().split())
if h % a == 0:
  print(int(h/a))
else:
  print(int(h//a)+1)

Buggy submission (verdict: Runtime Error):
h,a = map(int,input().split())
for n in range(0,):
  if h - a*n <= 0
  exit()
print(n)
Problem p02848 (python)

Fixed submission:
n = int(input())
s = str(input())
c = len(s)
t = ''
for i in range(0,c):
  if (ord(s[i])+n)>90:
    a = ord(s[i])+n-26
  else:
    a = ord(s[i])+n
  t += chr(a)
print(t)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
c = len(s)
for i in range(c):
  if (ord(s[i])+n)>90:
    s[i] = chr(ord(s[i])+n-26)
  else:
    s[i] = chr(ord(s[i])+n)
print(s)
Problem p02945 (python)

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

l = []
l.append(int(x))
l.append(int(y))
l.append(int(z))
print(max(l))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
x = int(a+b)
y = int(a-b)
z = int(a*b)
l = []
l = l.append(x,y,z)
print(max(l))
Problem p02952 (python)

Fixed submission:
n = int(input())
cnt = 0
for i in range(1,n+1):
  a = len(str(i))
  if a % 2 == 1:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = input()
cnt = 0
for i in range(1,n+1):
  a = len(i)
  if a % 2 == 1:
    cnt += 1
print(cnt)
Problem p02982 (python)

Fixed submission:
import math
n,d = map(int,input().split())
x = [list(map(int, input().split())) for i in range(n)]
ans = 0
for i in range(n-1):
    for j in range(i+1,n):
        t = 0
        for k in range(d):
            t+=(x[i][k]-x[j][k])**2 
        if math.sqrt(t)==int(math.sqrt(t)):
            ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
a = list([input() for i in range(0,d)] for j in range(0,n))
c = 0
r = 0
for i in range(0,n):
  for j in range(i+1,n):
    for k in range(0,d):
      c += (a[i][k]-a[j][k])^2
ans = c^(1/2)
if isinstance(ans,int) == True:
  r += 1
print(r)
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=int(input())
b=int(input())

c=a*b
if c % 2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03493 (python)

Fixed submission:
try:
  s = str(input())
  c = 0

  if s[0]=='1':
    c += 1
  if s[1]=='1':
    c += 1
  if s[2]=='1':
    c += 1
  print(c)
except:EOFError

Buggy submission (verdict: Runtime Error):
m = int(input())
c = m[0]+m[1]+m[2]
print(c)
Problem p02675 (python)

Fixed submission:
N = str(input())
num = N[-1]
num = int(num)
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')

Buggy submission (verdict: Runtime Error):
N = str(input())
num = N[-1]
num = int(num)
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')
N = str(input())
num = N[-1]
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')

Buggy submission (verdict: Runtime Error):
N = int(input())
num = N[-1]
 
if num == 3:
  print('bon')
elif num == 0 or num == 1 or num == 6 or num == 8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
N = int(input())
n_1 = N[-1]

if num == 3:
  print('bon')
elif num == 0 or num == 1 or num == 6 or num == 8:
  print('pon')
else:
  print('hon')
Problem p02760 (python)

Fixed submission:
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(N)]
B = [[0,0,0],[0,0,0],[0,0,0]]

ans = 'No'
for i, row in enumerate(A):
    for j, value in enumerate(row):
        if value in b:
            B[i][j] = 1
#print(B)
if B[0][0]==B[0][1]==B[0][2]==1 or B[1][0]==B[1][1]==B[1][2]==1 or B[2][0]==B[2][1]==B[2][2]==1:
    ans = 'Yes'
elif B[0][0]==B[1][0]==B[2][0]==1 or B[0][1]==B[1][1]==B[2][1]==1 or B[0][2]==B[1][2]==B[2][2]==1:
    ans = 'Yes'
elif B[0][0]==B[1][1]==B[2][2]==1 or B[0][2]==B[1][1]==B[2][0]==1:
    ans = 'Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(N)]
B = [[0,0,0],[0,0,0],[0,0,0]]

ans = 'No'
for i, row in enumerate(A):
    for j, value in enumerate(row):
        if value in b:
            B[i][j] = 1

if aB[0][0]==B[0][1]==B[0][2]==1 or B[1][0]==B[1][1]==B[1][2]==1 or B[2][0]==B[2][1]==B[2][2]==1:
    ans = 'Yes'
elif B[0][0]==B[1][0]==B[2][0]==1 or B[0][1]==B[1][1]==B[2][1]==1 or B[0][2]==B[1][2]==B[2][2]==1:
    ans = 'Yes'
elif B[0][0]==B[1][1]==B[2][2]==1 or B[2][2]==B[1][1]==B[2][0]==1:
    ans = 'Yes'
print(ans)

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


A = [list(map(int, input().split())) for _ in range(3)]
A = np.array(A)
N = int(input())
b = [int(input()) for _ in range(N)]
b = np.array(b)
B = np.full([3,3], False)
for item in b:
    B |= A == item
#print(B)

if(np.any(np.all(B[0])|np.all(B[1])|np.all(B[2])|np.all(B[:,0])|np.all(B[:,1])|np.all(B[:,2])|(B[0,0]==B[1,1]==B[2,2]==True)|(B[0,2]==B[1,1]==B[2,0]==True))):
    print('Yes')
else:
    print('No')

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


A = [list(map(int, input().split())) for _ in range(3)]
A = np.array(A)
N = int(input())
b = [int(input()) for _ in range(N)]
b = np.array(b)
B = np.full([3,3], False)
for item in b:
    B |= A == item
#print(B)

if(np.any(np.all(B[0])|np.all(B[1])|np.all(B[2])|np.all(B[:,0])\
          |np.all(B[:,1])|np.all(B[:,2])\
          |(B[0,0]==B[1,1]==B[2,2]==True)|(B[0,2]==B[1,1]==B[2,0]==True))):
    print('Yes')
else:
    print('No')
Problem p02772 (python)

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

for item in A:
    if item%2==0:
        B.append(item)
cnt = 0
ans = ''
for item in B:
    if item%3!=0:
        if item%5!=0:
            ans = 'DENIED'
if ans!='DENIED':
    ans = 'APPROVED'
print(ans)

Buggy submission (verdict: Runtime Error):
for item in A:
    if item%2==0:
        B.append(item)
cnt = 0
ans = ''
for item in B:
    if item%3!=0:
        if item%5!=0:
            ans = 'DENIED'
if ans!='DENIED':
    ans = 'APPROVED'
print(ans)
Problem p02802 (python)

Fixed submission:
N, M = map(int, input().split())
PS = [[x for x in input().split()] for _ in range(M)]
tmp = [0] * (10**5+1)
ac = wa = 0

for P, S in PS:
    if tmp[int(P)]==-1:
        continue
    if S=='WA':
        tmp[int(P)] += 1
    elif S=='AC':
        ac+=1
        wa+=tmp[int(P)]
        tmp[int(P)] = -1
        
print(ac,wa)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
PS = [[x for x in input().split()] for _ in range(M)]
tmp = [0] * N
ac = wa = 0

for P, S in PS:
    if S=='WA':
        tmp[int(P)] += 1
    elif S=='AC' and tmp[int(P)]!=-1:
        ac+=1
        wa+=tmp[int(P)]
        tmp[int(P)] = -1
        
print(ac,wa)
Problem p02946 (python)

Fixed submission:
import numpy as np
K, X = map(int, input().split())

tmp = X + K
tmp2 = X - K + 1

ans = np.arange(tmp2, tmp)
for i, v in enumerate(ans):
    print(' {}'.format(v), end='') if i > 0 else print('{}'.format(v), end='')
print('')

Buggy submission (verdict: Runtime Error):
import numpy as np
K, X = map(int, input().split())

tmp = X + K
tmp2 = X - K + 1

ans = np.arange(tmp2, tmp)
for i, v in enumerate(ans):
    print(f' {v}', end='') if i > 0 else print(f'{v}', end='')
print('')