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

Fixed submission:
s = input()
n = len(s)
ans = list(s)
cnt = 0
for i in range(n):
    if ans[i] == '?':
        ans[i] = 'D'
print(''.join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)
ans = ''
for i in range(n):
    if s[i] == '?':
        if i == 0:
            if s[1] == 'P':
                ans += 'D'
            else:
                ans += 'P'
        elif i == n-1:
            if ans[n-2] == 'P':
                ans += 'D'
            else:
                ans += 'P'
        else:
            if ans[i-1] == 'P' and s[i + 1] == 'P':
                ans +='D'
            else:
                ans += 'P'
    else:
        ans += s[i]

print(ans)
Problem p02900 (python)

Fixed submission:
from collections import Counter
from fractions import gcd
a, b = map(int, input().split())
n = int(max(a, b)**(1/2)) + 1

g = gcd(a, b)
cnt = Counter()
m = 2
while m*m<= g:
    while g % m == 0:
        g //= m
        cnt[m] += 1
    m += 1
if g > 1:
    cnt[g] += 1

print(len(cnt) + 1)

Buggy submission (verdict: Runtime Error):
from collections import Counter
from math import gcd
a, b = map(int, input().split())
n = int(max(a, b)**(1/2)) + 1
prime_num_cnt = [0]*(n + 1)
prime_num = []
for i in range(2, n+1):
    if prime_num_cnt[i] == 0:
        prime_num.append(i)
        tmp = i
        for j in range(1, n):
            if tmp*j > n:
                break
            prime_num_cnt[tmp*j] = 1


g = gcd(max(a, b), min(a, b))
cnt = Counter()
m = 2
while m <= g:
    while g % m == 0:
        g //= m
        cnt[m] += 1
    m += 1

print(len(cnt) + 1)

Buggy submission (verdict: Runtime Error):
from collections import Counter
from math import gcd
a, b = map(int, input().split())
n = int(max(a, b)**(1/2)) + 1
prime_num_cnt = [0]*(n + 1)
prime_num = []
for i in range(2, n+1):
    if prime_num_cnt[i] == 0:
        prime_num.append(i)
        tmp = i
        for j in range(1, n):
            if tmp*j > n:
                break
            prime_num_cnt[tmp*j] = 1


g = gcd(max(a, b), min(a, b))
cnt = Counter()
m = 2
while m*m < g:
    while g % m == 0:
        g //= m
        cnt[m] += 1
    m += 1

print(len(cnt) + 1)
Problem p02937 (python)

Fixed submission:
s = input()
t = input()
cnt = 0
last = 0
b = [{} for i in range(len(s))]
b[-1][s[-1]] = len(s) - 1
for i in range(len(s)-1)[::-1]:
    b[i] = b[i + 1].copy()
    b[i][s[i]] = i
if t[0] in b[0]:
    last = b[0][t[0]]
else:
    print(-1)
    exit()
for i in t[1:]:
    if last < len(s) - 1 and i in b[last + 1]:
        last = b[last + 1][i]
    else:
        if i not in s:
            print(-1)
            exit()
        last = b[0][i]
        cnt +=1
print(cnt*len(s) + last + 1)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
cnt = 0
last = 0
b = [{} for i in range(len(s))]
b[-1][s[-1]] = len(s) - 1
for i in range(len(s)-1)[::-1]:
    b[i] = b[i + 1].copy()
    b[i][s[i]] = i

for i in t:
    if i in b[last]:
        last = b[last][i]
    else:
        if last == 0:
            print(-1)
            exit()
        else:
            last = b[0][i]
            cnt +=1
print(cnt*len(s) + last + 1)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
cnt = 0
last = 0
b = [{} for i in range(len(s))]
b[-1][s[-1]] = len(s) - 1
for i in range(len(s)-1)[::-1]:
    b[i] = b[i + 1].copy()
    b[i][s[i]] = i

for i in t:
    if i in b[last]:
        last = b[last][i]
    else:
        if last == 0:
            print(-1)
            exit()
        else:
            last = b[0][i]
            cnt +=1
print(cnt*len(s) + last + 1)
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int,input().split())) + [0]
cnt = 0
if sum(l) <= x:
    print(n+1)
    exit()
for i in range(n + 1):
    if cnt > x:
        break
    cnt += l[i]
print(i)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = list(map(int,input().split()))
cnt = 0
for i in range(n+1):
    cnt += l[i]
    if cnt > x:
        break
print(i + 1)
Problem p03044 (python)

Fixed submission:
import heapq as hp
N = int(input())
ans = [-1]*N
arr = []
for i in range(N-1):
    u,v,w = map(int,input().split())
    u -= 1
    v -= 1
    arr.append([u,v,w])
e_list = [[] for i in range(N)]
for u,v,w in arr:
    e_list[u].append([v,w])
    e_list[v].append([u,w])

stack = [0]
ans[0] = 0
while(stack):
    cur_pos = stack.pop()
    for des,cost in e_list[cur_pos]:
        if ans[des] >=  0:
            continue
        ans[des] = (ans[cur_pos] + cost)%2
        stack.append(des)
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
import heapq as hp
N = int(input())
ans = [-1]*N
arr = []
for i in range(N-1):
    u,v,w = map(int,input().split())
    u -= 1
    v -= 1
    arr.append([u,v,w])
e_list = [[] for i in range(N)]
for u,v,w in arr:
    e_list[u].add([v,w])
    e_list[v].add([u,w])

stack = [0]
ans[0] = 0
for rnd in range(N):
    if stack == []:
        break
    cur_pos = stack.pop()
    for des in e_list[cur_pos]:
        if ans[des] >  0:
            continue
        ans[des] = ans[cur_pos] + e_list[des][cur_pos]
        stack.append(des)
for i in ans:
    print(i)
Problem p03085 (python)

Fixed submission:
def trans(g):
    gene = ['A', 'G', 'T', 'C']
    return gene[(gene.index(g)+2)%4]

b = input()
ans = ''

for i in b:
    ans += trans(i)

print(ans)

Buggy submission (verdict: Runtime Error):
def trans(g):
    gene = ['A', 'G', 'T', 'U']
    return gene[(gene.index(g)+2)%4]

b = input()
ans = ''

for i in b:
    ans += trans(i)

print(ans)
Problem p03132 (python)

Fixed submission:
n = int(input())
arr = [int(input()) for _ in range(n)]
def ear(n,t):
    if n:
        if t == 1 or t == 3:
            return n%2
        elif t == 2:
            return (n-1)%2
        else:
            return n
    else:
        if t == 1 or t == 3:
            return 2
        elif t == 2:
            return 1
        else:
            return 0
dp = [[0]*5 for _ in range(n)]
for i in range(n):
    for t in range(5):
        if i == 0:
            dp[i][t] = ear(arr[i],t)
        else:
            if t == 0:
                mind = dp[i-1][t]
                dp[i][t] = ear(arr[i],t) + mind
            else:
                if mind > dp[i-1][t]:
                    mind = dp[i-1][t]
                dp[i][t] = ear(arr[i],t) + mind
            dp[i][t] = ear(arr[i],t) + mind
print(min(dp[n-1]))

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = []
evod0 = []
even = [0]
odds = [0]
g0 = []
for i in range(N):
    tmp = int(input())
    arr.append(tmp)
    if tmp%2:
        evod0.append(1)
        even.append(even[-1]+1)
        odds.append(odds[-1])
    elif tmp>0:
        evod0.append(2)
        even.append(even[-1])
        odds.append(odds[-1]+1)
    else:
        evod0.append(0)
        g0.append(i)
        even.append(even[-1]+1)
        odds.append(odds[-1]+2)
ans = sum(arr)
#0を消す
for i in range(N-1):
    tmp = min(even[i+1]+odds[N] - odds[i+1],odds[i+1] + even[N] - even[i+1])
    ans = min(ans,tmp)
tmp = min(even[N],odds[N])
ans = min(ans,tmp)
#0を消さない
ans0 = 0
#左を全部0にする
ans0 += sum(arr[:g0[0]])
a0min = sum(arr[g0[-1]+1:])
for i in range(g0[-1]+1,N-1):
    tmp = min(even[i+1] - even[g0[-1]+1] + odds[N] - odds[i+1],odds[i+1] - odds[g0[-1]+1] + even[N] - even[i+1])
    a0min = min(a0min,tmp)
tmp = min(even[N]-even[g0[-1]+1],odds[N]-odds[g0[-1]+1])
a0min = min(a0min,tmp)
ans0 += a0min
#右を全部0に
right = sum(arr[g0[-1]:])
rmin = sum(arr[:g0[0]])
for i in range(0,g0[0]):
    tmp = min(even[i+1]+odds[g0[0]] - odds[i+1],odds[i+1] + even[g0[0]] - even[i+1])
    rmin = min(rmin,tmp)
tmp = min(even[g0[0]],odds[g0[0]])
rmin = min(tmp,rmin)
right += rmin
print(min(ans,ans0,right))
Problem p03138 (python)

Fixed submission:
from collections import Counter
N,K = map(int,input().split())
sarr = list(map(int,input().split()))
arr = sorted(sarr)
def xsum(arr,n):
    s = 0
    for i in arr:
        s += n^i
    return s
c = Counter()
for i in arr:
    n = 1
    while n <= K:
        if i%2:
            c[n] += 1
        else:
            c[n] += 0
        n *= 2
        i = i >> 1
ans = 0
p = [1]
while(p[-1]*2 <= K):
    p.append(p[-1]*2)
for i in p[::-1]:
    if c[i] < N - c[i]:
        if ans + i <= K :
            ans += i
print(max(xsum(arr,ans),xsum(arr,K)))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
arr = sorted(list(map(int,input().split())))
c = {}
num1 = 1
for i in range(k):
    c[num1] = 0
    num1 *= 2
    if num1 > k:
        break
for i in arr:
    num = 1
    while(num<=num1):
        if i%2 > 0:
            c[num] += 1
        num *= 2
        i = i>>1
x = 0
for i in c:
    if c[i]*2 < n:
        x += i
ans = 0
for i in arr:
    ans += x^i
print(ans)
Problem p03142 (python)

Fixed submission:
from collections import defaultdict, deque
import heapq
v, n = map(int, input().split())
es = [[int(x) for x in input().split()] for _ in range(v+n-1)]

outs = defaultdict(list)
ins = defaultdict(int)
edge_from = [[] for _ in range(v+1)]
edge_to = [[] for _ in range(v+1)]
ans = [-1]*(v+1)
for v1, v2 in es:
    edge_from[v1].append(v2)
    edge_to[v2].append(v1)
    outs[v1].append(v2)
    ins[v2] += 1

q = deque(v1 for v1 in range(v) if ins[v1] == 0)
res = []
while q:
    v1 = q.popleft()
    res.append(v1)
    for v2 in outs[v1]:
        ins[v2] -= 1
        if ins[v2] == 0:
            q.append(v2)
rev = [0]*(v+1)
for i in range(1,v+1):
    rev[res[i]] = i
redge_to = [[] for _ in range(v+1)]
for i in range(1,v+1):
    for j in edge_to[i]:
        ri = rev[i]
        rj = rev[j]
        heapq.heappush(redge_to[ri],-rj)
for ri in range(1,v+1):
    if redge_to[ri]:
        rj = redge_to[ri][0]
        i = res[ri]
        j = res[-rj]
        ans[i] = j
    else:
        i =res[ri]
        ans[i] = 0
for i in ans[1:]:
    print(i)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
edge_from = [set() for _ in range(N+1)]
edge_to = [set() for _ in range(N+1)]
ans = [-1]*(N+1)
child = set()
parent = -1
for _  in range(N-1+M):
    go,to = map(int,input().split())
    edge_from[go].add(to)
    edge_to[to].add(go)
    child.add(to)
for i in range(1,N+1):
    if i not in child:
        parent = i
from collections import deque
stack = deque()
stack.append(parent)
distance = [-1]*(N+1)
distance[parent] = 0
while stack:
    v = stack.popleft()
    for u in edge_from[v]:
        distance[u] = max(distance[v] + 1,distance[u])
        stack.append(u)
for i in range(1,N+1):
    print(distance[i])
Problem p03244 (python)

Fixed submission:
N = int(input())
v = list(map(int,input().split()))
v_even = [0 for i in range(max(v)+1)]
v_odd = [0 for i in range(max(v)+1)]
sum_even = 0
sum_odd = 0
for i in range(N):
    if i%2 :
        v_odd[v[i]] += 1
        sum_odd += 1
    else:
        v_even[v[i]] += 1
        sum_even += 1
max_odd = 0
odd = 0
max_even = 0
even = 0
for i in range(len(v_odd)):
    if v_odd[i] > max_odd:
        max_odd = v_odd[i]
        odd = i

for i in range(len(v_even)):
    if v_even[i] > max_even:
        max_even = v_even[i]
        even = i

if odd != even:
    ans = sum_even - max_even + sum_odd - max_odd
else:
    v_odd[odd] = 0
    v_even[even] = 0
    ans = min((sum_even - max_even + sum_odd - max(v_odd)), sum_even - max(v_even) + sum_odd - max_odd)

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
v = list(map(int,input().split()))
v_even = [0 for i in range(max(v)+1)]
v_odd = [0 for i in range(max(v))+1]
sum_even = 0
sum_odd = 0
for i in range(N):
    if i%2 :
        v_odd[v[i]] += 1
        sum_odd += 1
    else:
        v_even[v[i]] += 1
        sum_even += 1
max_odd = 0
odd = 0
max_even = 0
even = 0
for i in range(len(v_odd)):
    if v_odd[i] > max_odd:
        max_odd = v_odd[i]
        odd = i

for i in range(len(v_even)):
    if v_even[i] > max_even:
        max_even = v_even[i]
        even = i

if odd != even:
    ans = sum_even - max_even + sum_odd - max_odd
else:
    v_odd[odd] = 0
    v_even[even] = 0
    ans = min((sum_even - max_even + sum_odd - max(v_odd)), sum_even - max(v_even) + sum_odd - max_odd)

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
v = list(map(int,input().split()))
v_even = [0 for i in range(10**5)]
v_odd = [0 for i in range(10**5)]
sum_even = 0
sum_odd = 0
for i in range(N):
    if i%2 :
        v_odd[v[i]] += 1
        sum_odd += 1
    else:
        v_even[v[i]] += 1
        sum_even += 1
max_odd = 0
odd = 0
max_even = 0
even = 0
for i in range(10**5):
    if v_odd[i] > max_odd:
        max_odd = v_odd[i]
        odd = i

for i in range(10**5):
    if v_even[i] > max_even:
        max_even = v_even[i]
        even = i

if odd != even:
    ans = sum_even - max_even + sum_odd - max_odd
else:
    v_odd[odd] = 0
    v_even[even] = 0
    ans = min((sum_even - max_even + sum_odd - max(v_odd)), sum_even - max(v_even) + sum_odd - max_odd)

print(ans)
Problem p03359 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split()))
print(a if a<=b else a-1)
Problem p03427 (python)

Fixed submission:
arr=[int(i) for i in input()]
csum=[arr[0]]
for i in range(1,len(arr)):
  csum.append(csum[-1]+arr[i])
maxsum= csum[-1]

print(max(maxsum,arr[0]-1+9*(len(arr)-1)))

Buggy submission (verdict: Runtime Error):
arr=[int(i) for i in input()]
csum=[arr[0]]
for i in range(1,len(arr)):
  csum.append(csum[-1]+arr[i])
maxsum= csum[-1]

print(max(maxsum,arr[0]-1+9*(len(are)-1)))
Problem p03475 (python)

Fixed submission:
n = int(input())
csf = []
for i in range(n-1):
    csf.append(list(map(int,input().split())))


for i in range(n-1):
    time = 0
    for j in  range(i,n-1):
        if time <= csf[j][1]:
            time = csf[j][0] + csf[j][1]
        else:
            tmp = -time%csf[j][2] +csf[j][0]
            time += tmp
    print(time)

print('0')

Buggy submission (verdict: Runtime Error):
n = int(input())
csf = []
for i in range(n):
    csf.append(list(map(int,input().split())))


for i in range(n-1):
    time = 0
    for j in  range(i,n-1):
        if time < csf[j][1]:
            time = csf[j][0] + csf[j][1]
        else:
            tmp = (time-csf[j][1])%csf[j][2] +csf[j][0]
            time += tmp
    print(time)

print('0')
Problem p03579 (python)

Fixed submission:
N,M = map(int,input().split())
e_list = [[] for i in range(N)]
for i in range(M):
    a,b = map(lambda x:int(x)-1, input().split())
    e_list[a].append(b)
    e_list[b].append(a)
bin_or_not = True
ans = (N-1)*N//2 - M
w_or_b = [-1]*N
stack = [0]
w_or_b[0] = 0
while stack:
    x = stack.pop()
    for i in e_list[x]:
        if w_or_b[i] >= 0:
            bin_or_not = w_or_b[x]^w_or_b[i]
        else:
            w_or_b[i] = (w_or_b[x] + 1)%2
            stack.append(i)
        if not bin_or_not:
            break
    if not bin_or_not:
        break
if bin_or_not:
    w =  w_or_b.count(0)
    b = w_or_b.count(1)
    ans = w*b - M
print(ans)

Buggy submission (verdict: Runtime Error):
class BinPartite:
    def __init__(self, N, es):
        self.colors = [0 for i in range(N)]
        self.es = es

    def dfs(self, v, color):
        self.colors[v] = color
        for to in self.es[v]:
            if self.colors[to] == color:
                return False
            if self.colors[to] == 0 and not self.dfs(to, -color):
                return False
        return True

    def color_cnt(self, color):
        return self.colors.count(color)

    def is_bipartite(self):
        return self.dfs(0, 1)


N, M = map(int, input().split())
e_list = [[] for i in range(N)]
for i in range(M):
    a, b = map(lambda x: int(x)-1, input().split())
    e_list[a].append(b)
    e_list[b].append(a)

Bp = BinPartite(N, e_list)
if Bp.is_bipartite():
    b = Bp.color_cnt(1)
    w = Bp.color_cnt(-1)
    print(b*w-M)
else:
    print(N*(N-1)//2 - M)
Problem p03599 (python)

Fixed submission:
a,b,c,d,e,f = map(int,input().split())

water = []
suger = []
for i in range(f//(100*a)+1):
    for j in range(f//(100*b)+1):
        if 100*a*i + 100*b*j <= f and 100*a*i + 100*b*j not in water:
            water.append(100*a*i+100*b*j)

for i in range(f//c+1):
    for j in range(f//d+1):
        if c*i+d*j not in suger:
            suger.append(c*i+d*j)
max = 0
maxs = [100*a,0]
for w in water:
    for s in suger:
        if w+s > 0 and w//100*e >= s and w + s <= f and max < s/(w+s):
            max = s/(w+s)
            maxs = [w,s]

print(sum(maxs),maxs[1])

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,f = map(int,input().split())

water = []
suger = []
for i in range(f//(100*a)+1):
    for j in range(f//(100*b)+1):
        if 100*a*i + 100*b*j <= f and 100*a*i + 100*b*j not in water:
            water.append(100*a*i+100*b*j)

for i in range(f//c+1):
    for j in range(f//d+1):
        if c*i+d*j not in suger:
            suger.append(c*i+d*j)
max = 0
maxs = []
for w in water:
    for s in suger:
        if w+s > 0 and w//100*e >= s and w + s <= f and max < s/(w+s):
            max = s/(w+s)
            maxs = [w,s]

print(sum(maxs),maxs[1])
Problem p03846 (python)

Fixed submission:
N = int(input())
arr = sorted([int(i) for i in input().split()])
ok = True
b = {}
for i in range(N):
    if arr[i] not in b:
        b[arr[i]] = 1
    else:
        b[arr[i]] += 1
if N%2 :
    if b[0] != 1:
        ok = False
    for i in range(1,(N-1)//2+1):
        if ok== False:
            break
        if 2*i not in b or b[2*i]!= 2:
            ok = False
else:
    for i in range(1,N//2+1):
        if 2*i-1 not in b or b[2*i-1] != 2:
            ok = False
            break

if ok :
    print(2**(N//2)%(10**9+7))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = sorted([int(i) for i in input().split()])
ok = True
b = {}
for i in range(N):
    if arr[i] not in b:
        b[arr[i]] = 1
    else:
        b[arr[i]] += 1
if N%2 :
    if b[0] != 1:
        ok = False
    for i in range(1,(N-1)//2+1):
        if ok== False:
            break
        if b[2*i]!= 2:
            ok = False
else:
    for i in range(1,N//2+1):
        if b[2*i-1] != 2:
            ok = False

if ok :
    print(2**(N//2)%(10**9+7))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = sorted([int(i) for i in input().split()])
ok = True
b = {}
for i in range(N):
    if arr[i] not in b:
        b[arr[i]] = 1
    else:
        b[arr[i]] += 1
if N%2 :
    if b[0] != 1:
        ok = False
    for i in range(1,(N-1)//2+1):
        if b[2*i]!= 2:
            ok = False
else:
    for i in range(1,N//2+1):
        if b[2*i-1] != 2:
            ok = False

if ok :
    print(2**(N//2))
else:
    print(0)
Problem p04013 (python)

Fixed submission:
N,A = map(int,input().split())
x = [0] + list(map(int,input().split()))
X = max(x[1:])
y = [0] + list((i-A) for i in x[1:] )
dp = [[0]*(2*N*X+1) for _ in range(N+1)]

for j in range(N+1):
    for t in range(2*N*X+1):
        if j == 0 and t == N*X:
            dp[j][t] = 1
        elif j >= 1 and (t-y[j] < 0 or t - y[j] > 2*N*X):
            dp[j][t] = dp[j-1][t]
        elif j >= 1 and (t-y[j] >= 0 and t-y[j] <= 2*N*X):
            dp[j][t] = dp[j-1][t] + dp[j-1][t-y[j]]
        else:
            dp[j][t] = 0
print(dp[N][N*X]-1)

Buggy submission (verdict: Runtime Error):
N,A = map(int,input().split())
x = [0] + list(map(int,input().split()))
X = max(x)
dp = [[[0]*(N*X+1) for k in range(N+1)] for j in range(N+1)]

for j in range(N+1):
    for k in range(N+1):
        for s in range(N*X+1):
            if j == 0 and k == 0 and s == 0 :
                dp[j][k][s] = 1
            elif j >= 1 and s < x[j]:
                dp[j][k][s] = dp[j-1][k][s]
            elif j >= 1 and k >= 1 and s >= x[j]:
                dp[j][k][s] = dp[j-1][k][s] + dp[j-1][k-1][s-x[j]]
            else:
                dp[j][k][s] = 0
ans = 0
for k in range(1,N+1):
    ans += dp[N][k][k*A]
print(ans)
Problem p04043 (python)

Fixed submission:
s=sorted(list(map(int,input().split())))
print('YES' if s == [5,5,7] else 'NO')

Buggy submission (verdict: Runtime Error):
s=sorted(input())
print(YES if s == '557' else NO)
Problem p02658 (python)

Fixed submission:
import sys
n = int(input())
#print(n)
prod = 1
overflow = False

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

for aa in a:
  if prod * aa > 1000000 * 1000000 * 1000000:
    overflow = True
  else:
    prod = prod * aa

for aa in a:
  if aa == 0:
    overflow = False

if overflow:
  print(-1)
else:
  print(prod)

Buggy submission (verdict: Runtime Error):
import sys
inp = list(map(str,input().split()))
a = int(inp[0])
b = float(inp[1])
#print(a)
#print(b)
bb = int(b * 100)
print(int(a * bb / 100))
#prod = 1
#overflow = False
#
#a = list(map(int,input().split()))
#
#for aa in a:
#  if prod * aa > 1000000 * 1000000 * 1000000:
#    overflow = True
#  else:
#    prod = prod * aa
#
#for aa in a:
#  if aa == 0:
#    overflow = False
#
#if overflow:
#  print(-1)
#else:
#  print(prod)
Problem p02675 (python)

Fixed submission:
N = int(input())
if N % 10 == 3:
  print('bon')
elif N % 10 == 0:
  print('pon')
elif N % 10 == 1:
  print('pon') 
elif N % 10 == 6:
  print('pon')
elif N % 10 == 8:
  print('pon')  
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
N = input()
if N % 10 == 3:
  print('bon')
elif N % 10 == 0:
  print('pon')
elif N % 10 == 1:
  print('pon') 
elif N % 10 == 6:
  print('pon')
elif N % 10 == 8:
  print('pon')  
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
N = input()
if N % 10 == 3:
  print('bon')
elif N % 10 ==0:
  print('pon')
elif N % 10 ==1:
  print('pon') 
elif N % 10 ==6:
  print('pon')
elif N % 10 ==8:
  print('pon')  
else:
  print('hon')
Problem p02717 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = list(map(int, input(),split()))
print(c,a,b)

Buggy submission (verdict: Runtime Error):
a = list(map(str, input(),split()))
print(a[2],a[0],a[1])

Buggy submission (verdict: Runtime Error):
a = list(map(int, input(),split()))
print(a[2],a[0],a[1])
Problem p03369 (python)

Fixed submission:
A = input()
B = A.count('o')
print(700+int(B)*100)

Buggy submission (verdict: Runtime Error):
A = input()
B = print(A.count('o'))
print(700+int(B)*100)

Buggy submission (verdict: Runtime Error):
N = input()
s = 0
 for i in range(0,len(N)):
  if N[i] == "o":
    s = s + 1
print(700 + 100 * s)

Buggy submission (verdict: Runtime Error):
N = input()
s = 0
 for i in range(0,2):
  if N[i] == "o":
    s = s + 1
print(700+100*int(s))

Buggy submission (verdict: Runtime Error):
N = input()
s = 0
 for i in range(0,2):
  if N[i] == "o":
    s = s + 1
print(700+100*s)
Problem p03433 (python)

Fixed submission:
N=int(input())
A=int(input())
if N % 500 <= A:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
if N % 500 <== A:
  print("Yes")
else:
  print("No")
Problem p03455 (python)

Fixed submission:
N = list(map(int,input().split()))
math = N[0] * N[1]
if math % 2 == 1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 == 1:
  print("Odd")
 else:
  print("Even")

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 == 1:
  return "Odd"
 else:
  return "Even"

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 == 1:
  return Odd
 else: 
  return Even

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 == 1
 return Odd
 else 
 return Even

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 = 1
  return Odd
 else 
  return Even

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split()))
math = N[0] * N[1]
 if math % 2 == 1
  return Odd
 else 
  return Even

Buggy submission (verdict: Runtime Error):
N = list(map(int,input().split))
math = N[0] * N[1]
 if math % 2 == 1
  return Odd
 else 
  return Even