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

Fixed submission:
import numpy as np
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [int(input()) for i 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
a = np.array(a)
if sum(a[0,:]) == 0 or sum(a[1,:]) == 0 or sum(a[2,:]) == 0:
    print('Yes')
elif sum(a[:,0]) == 0 or sum(a[:,1]) == 0 or sum(a[:,2]) == 0:
    print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [int(input()) for i 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

if sum(a[0,:]) == 0 or sum(a[1,:]) == 0 or sum(a[2,:]) == 0:
    print('Yes')
elif sum(a[:,0]) == 0 or sum(a[:,1]) == 0 or sum(a[:,2]) == 0:
    print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [int(input()) for i 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

if sum(a[0:]) == 0 or sum(a[1:]) == 0 or sum(a[2:]) == 0:
    print('Yes')
elif sum(a[:0]) == 0 or sum(a[:1]) == 0 or sum(a[:2]) == 0:
    print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [[int(j) for j in input()] for i 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

if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:
    print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[3][0]) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [[int(j) for j in input()] for i 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

if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:
    print('Yes')
elif a[0][0] + a[1][1] + a[2][2] == 0 or a[0][2] + a[1][1] + a[3][0] == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [[int(j) for j in input()] for i 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

if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2] == 0):
    print('Yes')
elif a[0][0] + a[1][1] + a[2][2] or a[0][2] + a[1][1] + a[3][0]:
    print('Yes')
else:
    print('No')
Problem p02767 (python)

Fixed submission:
n = int(input())
x = list(map(int,input().split()))
Min,Max = min(x),max(x)
if Min == Max:
    print(0)
    exit()
s = [0] * (Max - Min)
k = 0

for i in range(Min,Max):
    for j in x:
        s[k] += (j - i) ** 2
    k += 1
print(min(s))

Buggy submission (verdict: Runtime Error):
n = int(input())
x = list(map(int,input().split()))
Min,Max = min(x),max(x)
s = [0] * (Max - Min)
k = 0

for i in range(Min,Max):
    for j in x:
        s[k] += (j - i) ** 2
    k += 1
print(min(s))
Problem p02802 (python)

Fixed submission:
n, m = map(int,input().split())
a = [input().split() for i in range(m)]
p = [int(i[0]) for i in a]
q = [j[1] for j in a]

ac = 0
wa = 0
wa_c = [0] * n
ac_c = [False] * n

for t in range(m):
    if ac_c[p[t]-1]:
        continue
    if q[t] == 'AC':
        ac += 1
        ac_c[p[t]-1] = True
        wa += wa_c[p[t]-1]
    else:
        wa_c[p[t]-1] += 1
print(ac,wa)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
if m ==0:
    print(0,0)
    exit()
p = [0] * (m+2)
s = [0] * (m+2)
w_count = 0
a_count = 0
flag = 0
for i in range(m+1):
    p[i],s[i] = input().split()
    if p[i] != p[i-1]:
        flag = 0
    if s[i] == 'AC' and flag == 0:
        flag = 1
        a_count += 1
    elif s[i] == 'WA':
        w_count += 1 and flag == 0
    


print(a_count,w_count)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
if m ==0:
    print(0,0)
    exit()
p = [0] * m 
s = [0] * m
w_count = 0
a_count = 0

for i in range(m):
    p[i],s[i] = input().split()

p = sorted(set(p))
i = int(p[0])
j = 0

while i != int(p[-1]) + 1:
    if p[j] == i and s[j] == 'WA':
        w_count += 1
    elif p[j] == i and s[j] == 'AC':
        a_count += 1
        i += 1
    j += 1

print(a_count,w_count)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
if m ==0:
    print(0,0)
    exit()
p = [0] * m 
s = [0] * m
w_count = 0
a_count = 0

for i in range(m):
    p[i],s[i] = input().split()

p = sorted(set(p))
i = int(p[0])
j = 0

while i != int(p[-1]) + 1:
    if s[j] == 'WA':
        w_count += 1
    elif s[j] == 'AC':
        a_count += 1
        i += 1
    j += 1

print(a_count,w_count)
Problem p02885 (python)

Fixed submission:
A,B=input().split()
length = int(A) - 2 * int(B)
if length < 0:
    print(0)
else:
    print(length)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
length = int(A) - 2 * int(B)
if length < 0:
    print(0)
else:
    print(length)

Buggy submission (verdict: Runtime Error):
A = input('A=: ')
B = input('B=: ')

length = int(A) - 2 * int(B)
if length < 0:
    print(0)
else:
    print(length)

Buggy submission (verdict: Runtime Error):
A = input('A=: ')
B = input('B=: ')
if not((1<=int(A)<=100) and (1<=int(B)<=100)):
    print("1<=A,B<=100")
    A = input('A=: ')
    B = input('B=: ')

length = int(A) - 2 * int(B)
if length < 0:
    print(0)
else:
    print(length)

Buggy submission (verdict: Runtime Error):
A = input('A=: ')
B = input('B=: ')
if not((1<=A<=100) && (1<=B<=100)):
    print("1<=A,B<=100")
    A = input('A=: ')
    B = input('B=: ')

Buggy submission (verdict: Runtime Error):
A-2*B

Buggy submission (verdict: Runtime Error):
A-2B
Problem p02899 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
L = [[] for i in range(N)]
for i in range(N):
    L[i] = [A[i], i+1]
L = sorted(L)
for i in range(N):
    print(L[i][1])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
A = [int(s) for s in A]
j = 1
while j < N:
    if j==A[i]:
        print(i)
        i = 0
        j = j + 1
    i = i + 1
Problem p02983 (python)

Fixed submission:
L,R = map(int,(input().split()))
mod = 2019
Min = 2018
for i in range(L,min(L+mod,R)):
    for j in range(i+1,min(L+mod,R+1)):
        Min = min(i*j%2019,Min)
print(Min)

Buggy submission (verdict: Runtime Error):
L,R = map(int,(input().split()))
List = []

for i in range(L,R+1):
    for j in range(i+1,R):
        List.append(i*j%2019)
print(min(List))
Problem p02995 (python)

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

def main():
    A,B,C,D = map(int,(input().split()))

    A_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)
    B_num = B//C + B//D - B//lcm(C, D)
    return (B-(A-1))-(B_num - A_num)


if __name__ == '__main__':
    print(main())

Buggy submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

def main():
    A,B,C,D = map(int,(input().split()))

    A_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)
    B_num = B//C + B//D - B//lcm(C, D)
    return (B-(A-1))-(B_num - A_num)


if __name__ == '__main__':
    print(main())
Problem p03031 (python)

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

q = []
for i in range(m):
    q.append(list(map(int,input().split())))
p = list(map(int,input().split()))

for s in range(2**n):
    judge = True
    for i in range(m):
        cnt = 0
        for j in range(1,len(q[i])):
            w = q[i][j]
            if s>>(w-1) &1 == 1:
                cnt += 1
        if cnt % 2 != p[i]:
            judge = False
    if judge:
        res += 1
print(res)

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
n,m = map(int,(input().split()))
bulb = [0]*m
p = [0]*m
j = 1
odd = 0
even = 0
for i in range(m):
    bulb[i] = list(map(int,input().split()))
p = list(map(int,input().split()))

for i in range(m):
    if not bulb[i][0]%2==p[i]:
        print(0)
        exit()
    elif bulb[i][0]%2==0:
        for j in range(0,bulb[i][0]+1,2):
            even = even + comb(bulb[i][0],j, exact=True)

        if len(bulb[i])==2:
            even = even/2
            
    else:
        for j in range(1,bulb[i][0]+1,2):
            odd = odd + comb(bulb[i][0],j, exact=True)

        if len(bulb[i])==2:
            odd = odd/2              
print(int(odd*even))

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
n,m = map(int,(input().split()))
bulb = [0]*m
p = [0]*m
j = 1
odd = 0
even = 0
for i in range(m):
    bulb[i] = list(map(int,input().split()))
p = list(map(int,input().split()))
 
for i in range(m):
    if not bulb[i][0]%2==p[i]:
        print(0)
        exit()
    elif bulb[i][0]%2==0:
        for j in range(0,bulb[i][0]+1,2):
            even = even + comb(bulb[i][0],j, exact=True)
            
        if len(bulb[i])==2:
            even = even/2
            
    else:
        for j in range(1,bulb[i][0]+1,2):
            odd = odd + comb(bulb[i][0],j, exact=True)
          
        if len(bulb[i])==2:
            odd = odd/2              
 
print(int(odd*even))

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
n,m = map(int,(input().split()))
bulb = [0]*m
p = [0]*m
j = 1
odd = 0
even = 0
for i in range(m):
    bulb[i] = list(map(int,input().split()))
p = list(map(int,input().split()))

for i in range(m):
    print('bulb='+str(bulb[i][0]))
    if not bulb[i][0]%2==p[i]:
        print(0)
        exit()
    elif bulb[i][0]%2==0:
        for j in range(0,bulb[i][0]+1,2):
            even = even + comb(bulb[i][0],j, exact=True)
            
        if len(bulb[i])==2:
            even = even/2
            
    else:
        for j in range(1,bulb[i][0]+1,2):
            odd = odd + comb(bulb[i][0],j, exact=True)
          
        if len(bulb[i])==2:
            odd = odd/2              

print(int(odd*even))
Problem p03076 (python)

Fixed submission:
dish = [0]*5
dish = [list(input()) for i in range(len(dish))]
time = 0
sumtime = 0

dish_sort = sorted(dish, key=lambda x:x[-1],reverse=True)
dish_sort = [''.join(dish_sort[i]) for i in range(len(dish))]
dish_sort = [int(i) for i in dish_sort]
dish1 = [i for i in dish_sort if i%10==0]
dish2 = [i for i in dish_sort if not i%10==0]
dish3 = dish1 + dish2

if len(dish2)==0:
    dish2.append(dish3[-1])
for i in range(len(dish3)-1):
    while dish3[i] > time:
        time += 10
    sumtime += time
    time = 0
print(sumtime+dish2[-1])

Buggy submission (verdict: Runtime Error):
dish = [0]*5
dish = [list(input()) for i in range(len(dish))]
time = 0
sumtime = 0

dish_sort = sorted(dish, key=lambda x:x[-1])
dish_sort = [''.join(dish_sort[i]) for i in range(len(dish))]
dish_sort1 = [int(i) for i in dish_sort]
dish_sort2 = [i for i in dish_sort1 if not i%10==0]
dish_sort1.remove(dish_sort2[0])

for i in range(len(dish)-1):
    while dish_sort1[i] > time:
        time += 10
    sumtime += time
    time = 0
print(sumtime+dish_sort2[0])
Problem p03289 (python)

Fixed submission:
s = list(input())
j= 2
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
s = ''.join(s)

if s.islower():
    print('AC')
    exit()

print('WA')

Buggy submission (verdict: Runtime Error):
S = input()
s = list(S)
j= 0
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del S[0]
del S[tmp-1]

if S.isupper():
    print('WA')
    exit()

print('AC')
Problem p02641 (python)

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

if n == 0:
    print(x)
else:
    p = list(map(int, input().split(" ")))

    p_under = list(filter(lambda v: v<=x, p))
    p_upper = list(filter(lambda v: v>=x, p))
    p_under.sort(reverse=True)
    p_upper.sort()

    cnt = 0
    while(True):
        if x - cnt not in p_under:
            print(x - cnt)
            break
        if x + cnt not in p_upper:
            print(x + cnt)
            break
        cnt += 1

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

p_under = list(filter(lambda v: v<x, p))
p_upper = list(filter(lambda v: v>x, p))
p_under.sort(reverse=True)
p_upper.sort()

cnt = 0
while(True):
    if x - cnt not in p_under:
        print(x - cnt)
        break
    if x + cnt not in p_upper:
        print(x + cnt)
        break
    cnt += 1
Problem p02684 (python)

Fixed submission:
N,K = map(int, input().split())
A = list(map(int, input().split()))

move = 1
l = [1]
flag = [False]*(N+1)
flag[1] = True

for i in range(K):
    move = A[move-1]
    if flag[move]:
        # ind = l.index(move)
        # l = l[ind:]
        break
    flag[move] = True
    l.append(move)

# print("ind:{}".format(ind))
# print("l:{}".format(l))
ind = l.index(move)
# l = l[ind:]
rest = (K-ind) % (len(l) - ind) + ind

# print(rest)
print(l[rest])

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

move = 1
l = [1]
flag = [False]*(N+1)
flag[1] = True

for i in range(K):
    move = A[move-1]
    if flag[move]:
        ind = l.index(move)
        l = l[ind:]
        break
    flag[move] = True
    l.append(move)

rest = (K-ind) % (len(l))

print(l[rest])
Problem p02756 (python)

Fixed submission:
S = input()
N = int(input())
line = [''] * (N+1) * 2
rev = False
pos = N
line[pos] = S
leftPos = pos - 1
rightPos = pos + 1

for i in range(N):
    A = input().split()
    if len(A) == 1:
        rev = not rev
    else:
        if A[1] == '1':
            if rev == False:
                pos = leftPos
                leftPos -= 1
            else:
                pos = rightPos
                rightPos += 1
        else:
            if rev == False:
                pos = rightPos
                rightPos += 1
            else:
                pos = leftPos
                leftPos -= 1
        line[pos] = A[2]

ans = line[leftPos+1:rightPos]
ans = "".join(ans)
if rev == False:
    print(ans)
else:
    print(ans[::-1])

Buggy submission (verdict: Runtime Error):
S = input()
N = int(input())
line = [''] * (N * 2)
rev = False
pos = N
line[pos] = S
leftPos = pos - 1
rightPos = pos + 1

for i in range(N):
    A = input().split()
    if len(A) == 1:
        rev = not rev
    else:
        if A[1] == '1':
            if rev == False:
                pos = leftPos
                leftPos -= 1
            else:
                pos = rightPos
                rightPos += 1
        else:
            if rev == False:
                pos = rightPos
                rightPos += 1
            else:
                pos = leftPos
                leftPos -= 1
        line[pos] = A[2]

ans = line[leftPos+1:rightPos]
ans = "".join(ans)
if rev == False:
    print(ans)
else:
    print(ans[::-1])
Problem p02573 (python)

Fixed submission:
import collections
import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components

n, m = map(int, input().split())

if m != 0:
    edge = np.array([input().split() for _ in range(m)], dtype = np.int64).T
    tmp = np.ones(m, dtype = np.int64).T
    graph = csr_matrix((tmp, (edge[:] -1)), (n, n))

    cnt = collections.Counter(connected_components(graph)[1])

    print(max(cnt.values()))
else:
    print('1')

Buggy submission (verdict: Runtime Error):
import collections
import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components

n, m = map(int, input().split())
edge = np.array([input().split() for _ in range(m)], dtype = np.int64).T
tmp = np.ones(m, dtype = np.int64).T
graph = csr_matrix((tmp, (edge[:] -1)), (n, n))

cnt = collections.Counter(connected_components(graph)[1])

print(max(cnt.values()))
Problem p02576 (python)

Fixed submission:
line = input()

N, X, T = (int(x) for x in line.split(" "))

print((N + X - 1) // X * T)

Buggy submission (verdict: Runtime Error):
line = input()
N, X, T = line.split(" ")

print((N + X - 1) // X * T)

Buggy submission (verdict: Runtime Error):
line = input();
N, X, T = line.split(" ")

return (N + X - 1) // X * T
Problem p02582 (python)

Fixed submission:
a = input()

if 'RRR' in a:
  print(3)
elif 'RR' in a:
  print(2)
elif 'R' in a:
  print(1)
else:
  print(0)

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

if RRR in a:
  print(3)
elif RR in a:
  print(2)
elif R in a:
  print(1)
else:
  print(0)
Problem p02583 (python)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)

Buggy submission (verdict: Runtime Error):
N=int(input())
l=[]
c=0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if (l[j]==l[k] or l[k]==l[m] or l[j]==l[m]):
        continue
      if ((l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k])):
        c += 1

print(c)

Buggy submission (verdict: Runtime Error):
N=int(input())
l=[]
c=0

for i in range(N):
	a = int(input())
	l.append(a)

for j in range(N):
  	for k in range(j+1,N):
    	for m in range(k+1,N):
      		if l[j]==l[k] or l[k]==l[m] or l[j]==l[m]:
        		continue
      		if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        		c += 1

print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if l[j]==l[k] or l[k]==l[m] or l[j]==l[m]:
        continue
      if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        c += 1

print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        c += 1

print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(1,N+1):
  a = int(input())
  l.append(a)

for j in range(1,N+1):
  for k in range(1,N+1):
    if j == k:
      continue
    for m in range(1,N+1):
      if (j == m) or (k == m):
        continue
      if (l[j] + l[k] > l[m]) or (l[j] + k[m] > l[k]) or (l[k] + l[m] > l[j]):
        c += 1

print(c)
Problem p02600 (python)

Fixed submission:
a = int(input())
 
if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1)

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

if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1)
Problem p02606 (python)

Fixed submission:
L,R,d=map(int,input().split())
a=0
for i in range(L,R+1):
  if i%d==0:
    a+=1
print(a)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
l = []

for i in range(a,b+1):
  if i%c==0:
    l.append(i)

print(len(l))
Problem p02675 (python)

Fixed submission:
N=input()
n=N[-1]
if n=='3':
  ans='bon'
elif n=='0' or n=='1' or n=='6' or n=='8':
  ans='pon'
else:
  ans='hon'
print(ans)

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

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

Buggy submission (verdict: Runtime Error):
N=int(input())
n=N[-1]
if n==3:
  ans='bon'
elif n==0,1,6,8:
  ans='hon'
else:
  ans='pon'
print(ans)
Problem p02694 (python)

Fixed submission:
x = int(input())

i = 0
a = 100
while a < x:
  a += a//100
  i += 1
print(i)

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

i = 0
while a < x:
  a = math.floor(x*0.01)
  i += 1
print(i)

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

i = 0
while a < x:
  	a = math.floor(x * 0.01)
    i += 1
print(str(i))
Problem p02717 (python)

Fixed submission:
x,y,z=map(str,input().split())
print(z+' '+x+' '+y)

Buggy submission (verdict: Runtime Error):
x,y,z=map(int,input().split())
print(z+' '+x+' '+y)
Problem p02765 (python)

Fixed submission:
n,r=map(int,input().split())
if n>=10:print(r)
else:print(r+100*(10-n))

Buggy submission (verdict: Runtime Error):
n,r=map(int,input().split())
if n>=10:print(r)
else:print(r-100*(10-k))
Problem p02921 (python)

Fixed submission:
s=input()
t=input()
c=0
for i in range(3):
  if s[i]==t[i]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
c=0
for i in (2):
  if s[i]==t[i]:
    c+=1
print(c)
Problem p02993 (python)

Fixed submission:
s=input()
ans='Good'
for i in range(3):
  if s[i]==s[i+1]:
    ans='Bad'
print(ans)

Buggy submission (verdict: Runtime Error):
s=int(input())
ans='Good'
for i in range(3):
  if s[i]==s[i+1]:
    ans='Bad'
print(ans)
Problem p03071 (python)

Fixed submission:
a,b=map(int,input().split())
if a==b:print(2*a)
else:print(max(a,b)+max(a-1,b-1))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:print(2*c)
else:print(max(a,b)+max(a-1,b-1))
Problem p03145 (python)

Fixed submission:
a=sorted(list(map(int,input().split())))
print(a[0]*a[1]//2)

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=a.sorted()
print(b[1]*b[2])
Problem p03238 (python)

Fixed submission:
n=int(input())
if n==1:print('Hello World')
else:
  a,b=int(input()),int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
a,b=int(input()),int(input())
if n==1:print('Hello World')
else:print(a+b)
Problem p03351 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
s='Yes'
if abs(a-c)>d:
  if abs(a-b)>d or abs(b-c)>d:
    s='No'
print(s)

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
a='Yes'
if abs(a-c)>d:
  if abs(a-b)>d or abs(b-c)>d:
    a='No'
print(a)
Problem p03547 (python)

Fixed submission:
x,y=input().split()
if ord(x)<ord(y):print('<')
elif ord(x)>ord(y):print('>')
else:print('=')

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
if ord(x)<ord(y):print('<')
elif ord(x)>ord(y):print('>')
else:print('=')
Problem p03555 (python)

Fixed submission:
a,b=input(),input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
a,b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:print('YES')
else:print('NO')
Problem p04043 (python)

Fixed submission:
S = input()

if S.count('5') == 2 and S.count('7') == 1:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
if A == 5 and B == 5 and C == 7:
  print('YES')
elif A == 5 and B == 7 and C == 5:
  print('YES')
elif A == 7 and B == 5 and C == 5:
  print('YES')
else:
  print('NO')