Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0]*N
for i in range(N):
    A[i] = int(input())

for i in range(N):
    B = A[:i] + A[i+1:]
    print(max(B))


Fixed submission:
N = int(input())
A = [0]*N

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

B = sorted(A,reverse=True)

for i in range(N):
    if A[i]==B[0]:
        print(B[1])
    else:
        print(B[0])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0]*N
for i in range(N):
    A[i] = int(input())

for i in range(N):
    tmp = A.pop(i)
    print(max(A))
    A.insert(i, tmp)

Fixed submission:
N = int(input())
A = [0]*N

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

B = sorted(A,reverse=True)

for i in range(N):
    if A[i]==B[0]:
        print(B[1])
    else:
        print(B[0])
Buggy python 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))

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 python 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())

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 python submission (verdict: Time Limit Exceeded):
A,B,C,D = map(int,(input().split()))
count = 0
for i in range(A,B+1):
    if i%C!=0 and i%D!=0:
        count += 1
print(count)


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 python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
l = [0]*m
r = [0]*m
ans = 0
for i in range(m):
    l[i],r[i] = map(int,input().split())

for i in range(n):

    for j in range(m):
        
        if  not l[j]<=i+1<=r[j]:
            break
        if j==m-1:
            ans += 1
            
print(ans)

Fixed submission:
n,m = map(int,input().split())
l = [0]*m
r = [0]*m
ans = 0
for i in range(m):
    l[i],r[i] = map(int,input().split())

Min = max(l)
Max = min(r)
for i in range(n):
    if Min<=i+1<=Max:
        ans += 1
print(ans)
Buggy python 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])

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 python 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')

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 python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = list(map(int,input().split()))
a = np.array(a)
ans = 0

while sum(np.mod(a,2)) != len(a):
    a = a * 3
    for i in range(len(a)):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
            break
    ans += 1

print(ans)

Fixed submission:
import numpy as np
n = int(input())
a = list(map(int,input().split()))
a = np.array(a)
ans = 0

for i in range(len(a)):
    while a[i] % 2 == 0:
        a[i] = a[i] / 2
        ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
D,T,S=input()
if(D==(S*T)):
  print("Yes")
else:
  print("No")

Fixed submission:
D,T,S=input().split()
if(float(T)>=(float(D)/float(S))):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
def minimumChar(S,T): 
    n, m = len(S), len(T) 
    ans = sys.maxsize 
    for i in range(m - n + 1): 
        minRemovedChar = 0
        for j in range(n): 
            if (S[j] != T[i + j]): 
                minRemovedChar += 1
        ans = min(minRemovedChar, ans) 
    return ans 
      
S=input()
T=input()

print(minimumChar(S, T)) 

Fixed submission:
import sys
def minimumChar(T,S): 
    n, m = len(T), len(S) 
    ans = sys.maxsize 
    for i in range(m - n + 1): 
        minRemovedChar = 0
        for j in range(n): 
            if (T[j] != S[i + j]): 
                minRemovedChar += 1
        ans = min(minRemovedChar, ans) 
    return ans 
      
S=input()
T=input()

print(minimumChar(T,S))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

MOD = 10**9 + 7

ans = 0
for i in range(1, N):
    for j in range(i+1, N+1):
        # print("{}:{}".format(i, j))
        ans += A[i-1] * A[j-1]
        ans %= MOD
print(ans)

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

MOD = 10 ** 9 + 7

ans = 0
s = sum(A)
for a in A:
    s -= a
    ans += s * a
    ans %= MOD

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = list(map(int, input().split()))

dp = [0] * (N+1)

for i in range(K,N+1):

    if i == K:
        temp = 1
        for j in range(K):
            temp *= A[i-1-j]
        dp[i] = temp
        continue

    dp[i] = int(dp[i-1] // A[i-1-K] * A[i-1])
    if i > K:
        if dp[i-1] < dp[i]:
            print('Yes')
        else:
            print('No')




Fixed submission:
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')

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = list(map(int, input().split()))

dp = [0] * (N+1)

for i in range(K,N+1):

    if i == K:
        temp = 1
        for j in range(K):
            temp *= A[i-1-j]
        dp[i] = temp
        continue

    dp[i] = int(dp[i-1] / A[i-1-K] * A[i-1])
    if i > K:
        if dp[i-1] < dp[i]:
            print('Yes')
        else:
            print('No')




Fixed submission:
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')

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = list(map(int, input().split()))

dp = [0] * (N+1)

for i in range(1,N+1):
    if i <= K - 1:
        continue

    if i == K:
        temp = 1
        for j in range(K):
            temp *= A[i-1-j]
        dp[i] = temp
        continue


    dp[i] = int(dp[i-1] / A[i-1-K] * A[i-1])

for k in range(K+1,N+1):
    if dp[k-1] < dp[k]:
        print('Yes')
    else:
        print('No')


Fixed submission:
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')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

for i in range(1,N+1):
    ans = 0
    for x in range(1,101):
        if (x**2 > i):
            break
        for y in range(1,101):
            if (y**2 > i):
                break
            for z in range(1,101):
                if (z**2 > i):
                    break
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                    ans += 1
    print(ans)


Fixed submission:
import collections

N = int(input())

dp = []
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= N:
                dp.append(a)

dpc = collections.Counter(dp)

for i in range(1,N+1):
    print(dpc[i])
Buggy python submission (verdict: Runtime Error):
import bisect
from collections import deque

n,m,k = map(int, input().split())
a = deque(map(int, input().split()))
b = deque(map(int, input().split()))

x = deque()
x.append(0)
for i in range(n + m):
    num = 0
    if len(a) == 0:
        num = b.popleft()
    elif len(b) == 0:
        num = a.popleft()
    elif a[0] == b[0]:
        if a[1] < b[1]:
            num = a.popleft()
        else:
            num = b.popleft()
    elif a[0] <= b[0]:
        num = a.popleft()
    else:
        num = b.popleft()
    x.append(num + x[-1])

x.popleft()

# 二分探索
pos = bisect.bisect_right(x, k)
print(pos)


Fixed submission:
import bisect
from collections import deque

n,m,k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

sa, sb = [0], [0]
s = 0
for i in range(n):
    s += a[i]
    if s > k:
        break
    sa.append(s)

s = 0
for i in range(m):
    s += b[i]
    if s > k:
        break
    sb.append(s)

ans = 0

# sa, sbの組み合わせ中の最大合計となる値を取得
for i in range(len(sa)):
    l = k - sa[i]
    if l < 0:
        break

    num = bisect.bisect_right(sb, l) - 1
    ans = max (ans, num+i)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
a = list(map(int, input().split()))
ac = collections.Counter(a)
q = int(input())
ans = []
for i in range(q):
    b, c = map(int, input().split())
    tmp = ac[b]
    del ac[b]
    ac[c]+= tmp
    ans.append(sum(num*size for num, size in ac.items()))

[print(total) for total in ans]


Fixed submission:
import collections

n = int(input())
a = list(map(int, input().split()))
a_sum = sum(a)
ac = collections.Counter(a)
q = int(input())
ans = []
for i in range(q):
    b, c = map(int, input().split())
    b_num = ac[b]
    before = b * b_num
    after = c * (b_num)
    a_sum = a_sum - before + after
    ans.append(a_sum)

    tmp = ac[b]
    del ac[b]
    ac[c]+= tmp

[print(total) for total in ans]
Buggy python 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


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 python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

ans = 1
for i in a:
    ans *= i

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


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

if 0 in a:
    print(0)
else:
    a.sort(reverse=True)
    ans = 1
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            print("-1")
            break
    else:
        print(ans)
Buggy python 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])


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 python submission (verdict: Time Limit Exceeded):
import math
A,B,N = map(int, input().split())

a = []
for i in range(N+1):
    ans = math.floor(A*i/B) - A*math.floor(i/B)
    a.append(ans)
print(max(a))


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

# 0,1,2..B-1 毎の繰り返しとなる
# Nの範囲で、最大はB-1が最大となるので、 min(N, B-1)

x = min(N, B-1)
ans = math.floor(A*x/B) - A*math.floor(x/B)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
k = int(input())

sum = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            sum += math.gcd(math.gcd(i,j), k)

print(sum)


Fixed submission:
import math
N = int(input())
 
sum = 0
for i in range(1, N+1):
    for j in range(1, N+1):
        tmp = math.gcd(i,j)
        for k in range(1, N+1):
            sum += math.gcd(tmp, k)
 
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

# 組み合わせ総数
ans = S.count('R') * S.count('G') * S.count('B')

for i in range(N):
    for j in range(i+1,N):
        k = 2 * j - i
        if j < k <= N - 1:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1
print(ans)



Fixed submission:
N = int(input())
S = input()

# 組み合わせ総数
ans = S.count('R') * S.count('G') * S.count('B')

for i in range(N):
    for j in range(i+1,N):
        k = 2 * j - i
        if k >= N:
            break
        if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
            ans -= 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(N-2):
    for j in range(i,N):
        if S[i] == S[j]:
            continue
        for k in range(j,N):
            if S[i] == S[k] or S[j] == S[k]:
                continue
            if j-i == k-j:
                continue
            cnt += 1
print(cnt)


Fixed submission:
N = int(input())
S = input()

# 組み合わせ総数
ans = S.count('R') * S.count('G') * S.count('B')

for i in range(N):
    for j in range(i+1,N):
        k = 2 * j - i
        if k >= N:
            break
        if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
            ans -= 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections

N, M = map(int, input().split())
WA_CNT = []
CLEAR = []
for i in range(M):
    P, S = input().split()
    P = int(P)
    if P in CLEAR:
        continue
    if S == "AC":
        CLEAR.append(P)
        continue

    WA_CNT.append(P)


cs = collections.Counter(WA_CNT)
num = len(CLEAR)
try_num = 0

for i in CLEAR:
    try_num += cs[i]
print("{} {}".format(num, try_num))

Fixed submission:
import collections

N, M = map(int, input().split())
WA_CNT = {}
CLEAR = {}
for i in range(M):
    P, S = input().split()
    if P in CLEAR:
        continue
    if S == "AC":
        CLEAR[P] = 1
        continue

    if not P in WA_CNT:
        WA_CNT[P] = 0
    WA_CNT[P] += 1


num = len(CLEAR)
try_num = 0
for i in CLEAR:
    if i in WA_CNT:
        try_num += WA_CNT[i]
print("{} {}".format(num, try_num))
Buggy python submission (verdict: Runtime Error):
import math

w = input()
total = 0
x = 0
y = 0


n = w[0]
d = w[2]
n = int(n)
d = float(d)


for x in range(n):
    w = input()

    i = w.index(' ')
    y = w[0:i]
    x = w[(i+1):]

    x = int(x)
    y = int(y)

    if math.sqrt((x*x)+(y*y)) <= d:
        total = total+1

print (total)

Fixed submission:
import math

w = input()
total = 0
x = 0
y = 0


i = w.index(' ')
n = w[0:i]
d = w[(i+1):]
n = int(n)
d = float(d)


for x in range(n):
    w = input()

    i = w.index(' ')
    y = w[0:i]
    x = w[(i+1):]

    x = int(x)
    y = int(y)

    if math.sqrt((x*x)+(y*y)) <= d:
        total = total+1

print (total)
Buggy python 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()))

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 python submission (verdict: Runtime Error):
line = input()
N, X, T = line.split(" ")

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

Fixed submission:
line = input()

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

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

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

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

Fixed submission:
line = input()

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

print((N + X - 1) // X * T)
Buggy python submission (verdict: Runtime Error):
N = list(int(input()).split())
c = 0

for n in N:
  c += n

if c % 9 == 0:
  print('Yes')
else:
  print('No')

Fixed submission:
N = list(input())
c = 0

for n in N:
  c += int(n)

if c % 9 == 0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N=input()
A=list(map(int, input().split()))
c=0
while len(A)!=0:
  a=A.index(max(A))
  for n in A[a:]:
    c+=(max(A)-n)
  del A[a:]
print(c)

Fixed submission:
N=int(input())
A=list(map(int, input().split()))
c=0
for i in range(N-1):
  if A[i]>A[i+1]:
    c+=A[i]-A[i+1]
    A[i+1]=A[i]
print(c)

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

a = A.index(max(A))

while a != 0:
  for n in A[a+1:]:
    c += (max(A) - n)
    del A[a:]
    a = A.index(max(A))
    
print(c)

Fixed submission:
N=int(input())
A=list(map(int, input().split()))
c=0
for i in range(N-1):
  if A[i]>A[i+1]:
    c+=A[i]-A[i+1]
    A[i+1]=A[i]
print(c)
Buggy python 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)

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 python submission (verdict: Runtime Error):
a = input()

if a >= 30:
  print('Yes')
else:
  print('No')

Fixed submission:
a = int(input())

if a >= 30:
  print('Yes')
else:
  print('No')
Buggy python 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)

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 python 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))

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 python 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)


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 python 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)

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 python 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)

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 python submission (verdict: Runtime Error):
K = input()
A = input()
B = input()

i = 1
r = i * K
while r <= B:
  if r >= A:
    print('YES')
  elif r < A:
    i += 1
    r =  i * K
  else:
    print('NO')

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

for i in range(a,b + 1):
  if i % k == 0:
    print('OK')
    break
else:
  print('NG')
Buggy python submission (verdict: Runtime Error):
x = int(input())

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

Fixed submission:
x = int(input())

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

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

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

Fixed submission:
x = int(input())

i = 0
a = 100
while a < x:
  a += a//100
  i += 1
print(i)
Buggy python submission (verdict: Runtime Error):
x,y,z=map(int,input().split())
print(z+' '+x+' '+y)

Fixed submission:
x,y,z=map(str,input().split())
print(z+' '+x+' '+y)
Buggy python submission (verdict: Runtime Error):
s=input()
if 'A','B' in s:
  print('Yes')
else:
  print('No')

Fixed submission:
s=input()
if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
s=input()
if A,B in s:
  print('Yes')
else:
  print('No')

Fixed submission:
s=input()
if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n,r=map(int,input().split())
if n>=10:print(r)
else:print(r-100*(10-k))

Fixed submission:
n,r=map(int,input().split())
if n>=10:print(r)
else:print(r+100*(10-n))
Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
c=0
for i in (2):
  if s[i]==t[i]:
    c+=1
print(c)

Fixed submission:
s=input()
t=input()
c=0
for i in range(3):
  if s[i]==t[i]:
    c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
s=list(input())
a=len(set(s)
if a==2:
	b=len([t for t in s if t==s[0]])
	if b==2:
      	print('Yes')
    else:
      	print('No')
else:
    print('No')

Fixed submission:
s=list(input())
a=len(set(s))
ans='No'
if a==2:
  b=len([t for t in s if t==s[0]])
  if b==2:
    ans='Yes'
print(ans)
Buggy python submission (verdict: Runtime Error):
s=int(input())
ans='Good'
for i in range(3):
  if s[i]==s[i+1]:
    ans='Bad'
print(ans)

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