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

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N=input()
a=list(map(int,input().split()))
c=0
T=True
for i in a:
    if (i%2)!=0:
        print(c)
        break
    else:
        while T:
            a=list(map(lambda x:x/2,a))
            c+=1
            b=list(map(lambda x:True if x%2==0 else False,a))
            T=b[False]
print(c)

Buggy submission (verdict: Runtime Error):
N=input()
a=list(map(int,input().split()))
c=0
T=True
for i in a:
    if (i%2)!=0:
        print(c)
        break
    else:
        while T:
            a=list(map(lambda x:x/2,a))
            c+=1
            b=list(map(lambda x:True if x%2==0 else False,a))
            T=b[False]
        print(c)

Buggy submission (verdict: Runtime Error):
N=input()
a=list(map(int,input().split()))
i=0
T=True
while T:
    a=list(map(lambda x: x/2,a))
    c=list(map(lambda x : True if x%2 ==0 else False,a))    
    for k in c:
        if k==False:
            T=False
            i-=1
    i+=1
print(i)

Buggy submission (verdict: Runtime Error):
N=input()
a=list(map(int,input().split()))
i=0
T=True
while T:
    a=list(map(lambda x: int(x/2),a))
    i+=1
    c=list(map(lambda x : True if x%2 ==0 else False,a))    
    for k in c:
        if k==False:
            T=False
print(i)
Problem p03494 (python)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import numpy as np
N=input()
a=list(map(int,input().split(",")))
a=np.asarray(a)
b=0
while True:
    if all(a%2==0):
        a=a/2
        b+=1
    else:
        break
print(b)

Buggy submission (verdict: Runtime Error):
import numpy as np
N=input()
a=list(map(int,input().split(",")))
a=np.asarray(a)
b=0
while True:
  if all(a%2==0):
    a=a/2
    b+=1
  else:
    break
print(b)
Problem p03795 (python)

Fixed submission:
n = input()

print 800*n - 200*(int(n/15))

Buggy submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

if M - 2*N < 0:
  print N
else:
  print N + int((M - 2*N)/4)
Problem p03047 (python)

Fixed submission:
list = [int(x) for x in input().split()]
print(list[0] - list[1] + 1)

Buggy submission (verdict: Runtime Error):
list = [int(x) for x in input().split()]
print(list[0] - list[1] + 1]
Problem p03044 (python)

Fixed submission:
g = {}
a = int(input())
for i in range(a - 1):
    c = [int(s) for s in input().split()]
    if c[0] not in g: g[c[0]] = [(c[1], c[2])]
    else: g[c[0]].append((c[1], c[2]))

    if c[1] not in g: g[c[1]] = [(c[0], c[2])]
    else: g[c[1]].append((c[0], c[2]))

c = {}
d = {i: False for i in range(1, a + 1)}
c[1], d[1] = 0, True
Q = [1]
while(Q != []):
    r = Q.pop(0)
    for i in g[r]:
        if d[i[0]] == False:
            d[i[0]] = True
            Q.append(i[0])
            if i[1] % 2 == 0: c[i[0]] = c[r]
            else: c[i[0]] = (c[r] + 1) % 2
for i in range(1, a + 1): print(c[i])

Buggy submission (verdict: Runtime Error):
g = {}
a = int(input())
vertices = [i for i in range(1, a + 1)]
for i in range(a):
    c = [int(s) for s in input().split()] 
    print(0)
Problem p03146 (python)

Fixed submission:
n = int(input())
ans = 1
while (n != 4 and n != 2 and n != 1):
  ans += 1
  if n%2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1

print(ans + 3)

Buggy submission (verdict: Runtime Error):
n = input()
ans = 1
while (n != 4 and n != 2 and n != 1):
  ans += 1
  if n % 2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1

print(ans + 3)
Problem p03455 (python)

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

if a*b%2:
    print('Odd')
else:
    print('Even')

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

if a*b%2:
    print('Odd')
else:
    print('Even')

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

if a*b%2:
    print('Odd')
else:
    print('Even')
Problem p03071 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

coin = 0
if a >= b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1
if a >= b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1

print(coin)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n,k = map(int,input().split())
s = list(input())
s = list(map(int,s))

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

ss = array_count(s)

if ss[0][0] == 0:
    ss = [[1,0]] + ss

if ss[-1][0] == 1:
    ss.append([0,0])

ss_sum = []
temp = 0
for i in range(len(ss)):
    temp += ss[i][1]
    ss_sum.append(temp)

ans = -1
for i in range(len(ss_sum)):
    temp = 0
    if i % 2 == 0:
        if i + k * 2 < len(ss_sum):
            temp = ss_sum[i+k*2] - ss_sum[i]
    else:
        if i + k * 2 + 1 < len(ss_sum):
            temp = ss_sum[i+k*2+1] -  ss_sum[i]
    ans = max(temp,ans)

if k * 2 >= len(ss):
    ans = ss_sum[-1]

print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n,k = map(int,input().split())
s = list(input())
s = list(map(int,s))

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

ss = array_count(s)

if ss[0][0] == 0:
    ss = [[1,0]] + ss

if ss[-1][0] == 1:
    ss.append([0,0])

ss_sum = []
temp = 0
for i in range(len(ss)):
    temp += ss[i][1]
    ss_sum.append(temp)

ans = -1
for i in range(len(ss_sum)):
    temp = 0
    if i % 2 == 0:
        if i + k * 2 < len(ss_sum):
            temp = ss_sum[i+k*2] - ss_sum[i]
    else:
        if i + k * 2 + 1 < len(ss_sum):
            temp = ss_sum[i+k*2+1] -  ss_sum[i]
    ans = max(temp,ans)

if k * 2 >= len(ss):
    ans = ss_sum[-1]

print(ans)
Problem p03087 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n, q = map(int,input().split())
s = list(input())
l = [0] * q
r = [0] * q
for i in range(q):
    l[i],r[i] = map(int,input().split())

aclist = []

cnt = 0
for i in range(n):
    if s[i-1] == "A" and s[i] == "C":
        cnt += 1
        aclist.append(cnt)
    else:
        aclist.append(cnt)

for i in range(q):
    print(aclist[r[i]-1] - aclist[l[i]-1])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n, q = map(int,input().split())
s = list(input())
l = [0] * q
r = [0] * q
for i in range(q):
    l[i],r[i] = map(int,input().split())

aclist = []

cnt = 0
for i in range(n+1):
    if s[i-1] == "A" and s[i] == "C":
        cnt += 1
        aclist.append(cnt)
    else:
        aclist.append(cnt)

for i in range(q):
    print(aclist[r[i]-1] - aclist[l[i]-1])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n,q = map(int,input().split())
s = input()
lr = []
for i in range(0,q):
    lr.append(input().split())
map(int,lr)

ei = []
for index, item in enumerate(s):
    if index == n - 1:
        break
    if s[index] == "A" and s[index + 1] == "C":
        ei.append(index)
        ce.append(index+1)

for i in range(0,q):
    sum = 0
    for j in range(int(lr[i][0])-1,int(lr[i][1])):
        if j in ei:
            sum += 1
    if int(lr[i][1])-1 in ei:
        sum -= 1
    print(sum)

print(ei)
Problem p03125 (python)

Fixed submission:
a,b = map(int,input().split())
if b % a== 0:
    print(a+b)
else:
    print(b-a)

Buggy submission (verdict: Runtime Error):
import sys
import os
f = open("C:/Users/user/Documents/python/atcoder/ABC118/import.txt","r")
sys.stdin = f

# -*- coding: utf-8 -*-

a,b = map(int,input().split())
if a % b == 0:
    print(a+b)
else:
    print(b-a)
Problem p03196 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

fac = factorize(p)

if len(fac) >= 1:
    arr = array_count(fac)

    ans = 1
    for i in range(len(arr)):
        if arr[i][1] >= n:
            ans *= arr[i][0] ** (arr[i][1] // n)

    print(ans)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

fac = factorize(p)
arr = array_count(fac)

ans = 1
for i in range(len(arr)):
    if arr[i][1] >= n:
        ans *= arr[i][0]

print(ans)
Problem p03219 (python)

Fixed submission:
# -*- coding: utf-8 -*-

x,y = map(int,input().split())
print(int(x + y / 2))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n,m = map(int,input().split())
p = [0] * m
y = [0] * m
for i in range(m):
    p[i],y[i] = map(int,input().split())

certificate = [[] for _ in range(n)]

for i in range(m):
    certificate[p[i]-1].append(y[i])

for i in range(len(certificate)):
    certificate[i].sort()

for i in range(m):
    number = ""
    number += str(p[i]).zfill(6)
    number += str(certificate[p[i]-1].index(y[i])+1).zfill(6)
    print(number)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n,m = map(int,input().split())
p = [0] * m
y = [0] * m
for i in range(m):
    p[i],y[i] = map(int,input().split())

certificate = [[] for _ in range(n)]

for i in range(m):
    certificate[p[i]-1].append(y[i])

for i in range(len(certificate)):
    certificate[i].sort()

for i in range(m):
    number = ""
    number += str(p[i]).zfill(6)
    number += str(certificate[p[i]-1].index(y[i])+1).zfill(6)
    print(number)
Problem p03292 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

a.sort()

print(a[2]- a[0])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

a.list()

print(+a[i+2]- a[i])
# -*- coding: utf-8 -*-

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

a.list()

print(+a[i+2]- a[i])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

a.list()

print(+a[i+2]- a[i])
Problem p03323 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

if a > 8 or b > 8:
    print(":(")
else:
    print("Yay!")

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

cnt = 0

for i in range(n):
    while(True):
        if a[i] % 2 != 0:
            break
        else:
            a[i] = int(a[i] / 2)
            cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

if a >= 8 o r b >= 8:
    print(":(")
else:
    print("Yay!")
Problem p03377 (python)

Fixed submission:

# -*- coding: utf-8 -*-

a,b,x = map(int,input().split())

if a <= x <= a + b:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n=int(input())
l=list(map(int,input().split()))
sl=l[:]
sl.sort()
a=sl[n//2-1]
b=sl[n//2]
for i in l:
  if i<=a:
    print(b)
  else:
    print(a)
Problem p03433 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n = int(input())
a = int(input())

if n % 500 <= a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = input()
a = input()

if n % 500 <= a:
    print("Yes")
else:
    print("No")
Problem p03457 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

def travel(x,y,t):
    if abs(t-t_st) >= abs(x-x_st) + abs(y-y_st) and abs(t-t_st) % 2 == (abs(x-x_st) + abs(y-y_st)) % 2:
        return True
    else:
        return False

t_st = 0
x_st = 0
y_st = 0

ans = travel(x[0],y[0],t[0])

for i in range(1,n):
    x_st = x[i-1]
    y_st = y[i-1]
    t_st = t[i-1]
    if travel(x[i],y[i],t[i]):
        pass
    else:
        ans = False

if ans:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

def travel(x,y,t):
    if t == t_st:
        if x == x_st and y == y_st:
            return True
        else:
            return False
    if travel(x-1,y,t-1) or travel(x,y-1,t-1) or travel(x+1,y,t-1) or travel(x,y+1,t-1):
        return True
    else:
        return False

t_st = 0
x_st = 0
y_st = 0

ans = travel(x[0],y[0],t[0])

for i in range(1,n):
    x_st = x[i-1]
    y_st = y[i-1]
    t_st = t[i-1]
    if travel(x[i],y[i],t[i]):
        pass
    else:
        ans = False

if ans:
    print("Yes")
else:
    print("No")
Problem p03485 (python)

Fixed submission:
# -*- coding: utf-8 -*-

import math

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

print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

set_a = set(a)
a.sort()
k = 0
p = 0
ans = 0
for a_ in set_a:
    s = a[k]
    while True:
        if k<len(a) and a[k]==s:
            k+=1
            p+=1
        else:
            if p>=s:
                ans+=p-s
            else:
                ans+=p
            p=0
            break
print(ans)
Problem p03565 (python)

Fixed submission:
S = list(input())
T = list(input())
LS = len(S)
LT = len(T)
a = ""
for i in reversed(range(LS - LT + 1)):
    for j in range(LT):
        if S[i + j] != T[j] and S[i + j] != "?":
            break
        if j == LT - 1:
            for k in range(LT):
                S[i + k] = T[k]
            #print("".join(S))
            s = str("".join(S)).replace("?", "a")
            print(s)
            exit()
# S = S.replace("?", "a")
print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = list(input())
t = list(input())

slen = len(s)
tlen = len(t)

cand = []
for i in range(slen - tlen + 1):
    match = True
    for j in range(tlen):
        if s[i + j] == "?" or s[i + j] == t[j]:
            pass
        else:
            match = False
    if match:
        cand.append(i)

if len(cand) != 0:
    cand.reverse()
    ans = ""
    for i in range(slen):
        if not (cand[0] <= i <= cand[0] + tlen):
            if s[i] == "?":
                ans += "a"
            else:
                ans += s[i]
        else:
            ans += t[i - cand[0]]        
    print(ans)
else:
    print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = list(input())
t = list(input())
a = []

for i in range(len(t)-1,len(s)):
    lock = True
    for j in range(len(t)):
        if s[i-len(t)+j+1] == "?":
            pass
        elif s[i-len(t)+j+1] != t[j]:
            lock = False
    if lock:
        a.append(s[:i-len(t)+1] + t[:])

if len(a) == 0:
    print("UNRESTORABLE")
else:
    a.sort()
    for i in range(len(a[0])):
        if a[0][i] == "?":
            a[0][i] = "a"

answer = "".join(a[0])

print(answer)
Problem p03578 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

d.sort()
t.sort()

d = array_count(d)
t = array_count(t)

for i in range(len(t)):
    t[i][1] = -1 * t[i][1]
    d.append(t[i])

d.sort()

for i in range(1,len(d)):
    if d[i-1][0] == d[i][0]:
        d[i-1][1] = d[i-1][1] + d[i][1]
        d[i][1] = 0

flag = True

for i in range(len(d)):
    if d[i][1] < 0:
        flag = False
        break

if flag:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

d.sort()
t.sort()

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

d = array_count(d)
t = array_count(t)

cand = [0] * 200000

for i in range(len(d)):
    cand[d[i][0]] += d[i][1]

for i in range(len(t)):
    cand[t[i][0]] -= t[i][1]

flag = True
for i in range(len(cand)):
    if cand[i] < 0:
        flag = False

if flag:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

d.sort()
t.sort()

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

d = array_count(d)
t = array_count(t)

cand = [0] * 200000

for i in range(len(d)):
    cand[d[i][0]] += d[i][1]

for i in range(len(t)):
    cand[t[i][0]] -= t[i][1]

flag = True
for i in range(len(cand)):
    if cand[i] < 0:
        flag = False

if flag:
    print("YES")
else:
    print("NO")
Problem p03597 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n = int(input())
a = int(input())

print(n*n-a)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

max_water = f // 100 * a
max_sugar = f // c

water = []
for i in range(max_water):
    for j in range(max_water):
        water.append(100*a*i+100*b*j)

sugar = []
for i in range(max_sugar):
    for j in range(max_sugar):
        sugar.append(c*i+d*j)

answer = 0
anssugar = 0
answater = 0

for i in range(len(water)):
    for j in range(len(sugar)):
        if water[i] == 0 and sugar[j] == 0:
            continue
        con = 100 * sugar[j] / (water[i] + sugar[j])
        if answer < con and con <= e and sugar[j] + water[i] <= f :
            answer = con
            anssugar = sugar[j]
            answater = water[i]

print(answater+anssugar,anssugar)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input(n))
a = int(input(a))

print(n*n-a)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = input(n)
a = input(a)

print(n*n-a)
Problem p03623 (python)

Fixed submission:
# -*- coding: utf-8 -*-

x,a,b = map(int,input().split())

if abs(x-a) < abs(x-b):
    print("A")
else:
    print("B")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

def array_count(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target


a.sort()
a = array_count(a)

b= []

for i in range(len(a)):
    if a[i][1] >= 2:
        b.append(a[i][0])
    if a[i][1] >= 4:
        b.append(a[i][0])

b.sort()
b.reverse()

if len(b) <= 1:
    print(0)
else:
    print(b[0]*b[1])
Problem p03635 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

print(max(0,(n-1)*(m-1)))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
N = int(input())
a = [int(i) for i in input().split()]
b = []
for x in a:
    num = 0
    if x%2 == 0:
        x = x//2
        num += 1
        if x%2 == 0:
            num += 1
    b.append(num)
if b.count(0) <= b.count(2):
    print('Yes')
else:
    if b.count(0) == b.count(2)+1 and len(b) == b.count(0)+b.count(2):
        print('Yes')
    else:
        print('No')
Problem p03643 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n = input()

print("ABC" + n)

Buggy submission (verdict: Runtime Error):
import sys
import os

f = open("C:/Users/user/Documents/atCoderProblem/import.txt","r")
sys.stdin = f

# -*- coding: utf-8 -*-

n = input()

print("ABC" + n)
Problem p03671 (python)

Fixed submission:
# -*- coding: utf-8 -*-

a,b,c = map(int,input().split())

print(min(a+b,b+c,c+a))

Buggy submission (verdict: Runtime Error):

n = int(input())
a = list(map(int,input().split()))
b = ["A" for i in range(1000001)]

for i in range(n):
    if i % 2 != 0:
        b.append(a[i])
    else:
        b[1000000-i] = a[i]

while b[0] == "A" :
    del b[0]

while "A" in b:
    b.remove("A")

if n % 2 != 0:
    pass
else:
    b.reverse()

for i in range(len(b)):
    if i == len(b) - 1:
        print(b[i])
        break
    print(b[i],end = " ")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int,input().split()))
b = ["A" for i in range(1000001)]

for i in range(n):
    if i % 2 != 0:
        b.append(a[i])
    else:
        b[1000000-i] = a[i]

while "A" in b:
    b.remove("A")

if n % 2 != 0:
    pass
else:
    b.reverse()

for i in range(len(b)):
    if i == len(b) - 1:
        print(b[i])
        break
    print(b[i],end = " ")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int,input().split()))
b = []

for i in range(n):
    if i % 2 != 0:
        b.append(a[i])
    else:
        c = [0] + b[:]
        c[0] = a[i]
        b = c

if n % 2 != 0:
    pass
else:
    b.reverse()

for i in range(len(b)):
    if i == len(b) - 1:
        print(b[i])
        break
    print(b[i],end = " ")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int,input().split()))
b = []

for i in range(n):
    if i % 2 != 0:
        b.append(a[i])
    else:
        c = [0] + b[:]
        c[0] = a[i]
        b = c

if n % 2 != 0:
    pass
else:
    b.reverse()

for i in range(len(b)):
    if i == len(b) - 1:
        print(b[i])
        break
    print(b[i],end = " ")