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

Fixed submission:
window, cartain = map(int, input().split())

ret = window - cartain * 2
if ret > 0:
    print(ret)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
import sys


def main(window_len, cartain_len):
    ret = int(window_len) - int(cartain_len)*2
    if ret >= 0:
        return ret
    else:
        return 0


if __name__ == "__main__":
    args = sys.argv
    window_len = args[1]
    cartain_len = args[2]
    print(main(window_len, cartain_len))

Buggy submission (verdict: Runtime Error):
import sys


def main():
    ret = window_len - cartain_len*2
    if ret >= 0:
        return ret
    else:
        return 0


if __name__ == "__main__":
    args = sys.argv
    window_len = args[1]
    cartain_len = args[2]
    main(window_len, cartain_len)
Problem p02760 (python)

Fixed submission:
import sys

A = [[0] * 3 for i in range(3)]

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

N = int(input())
for _ in range(N):
    b = int(input())
    if b in A1:
        for a in [i for i, x in enumerate(A1) if x == b]:
            A[0][a] = 1
    if b in A2:
        for a in [i for i, x in enumerate(A2) if x == b]:
            A[1][a] = 1
    if b in A3:
        for a in [i for i, x in enumerate(A3) if x == b]:
            A[2][a] = 1

for i in range(3):
    if sum(A[i][:]) == 3:
        print('Yes')
        sys.exit()

if A[0][0] == 1 and A[1][0] == 1 and A[2][0] == 1:
    print('Yes')
    sys.exit()
if A[0][1] == 1 and A[1][1] == 1 and A[2][1] == 1:
    print('Yes')
    sys.exit()
if A[0][2] == 1 and A[1][2] == 1 and A[2][2] == 1:
    print('Yes')
    sys.exit()

if A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:
    print('Yes')
    sys.exit()

if A[0][2] == 1 and A[1][1] == 1 and A[2][0] == 1:
    print('Yes')
    sys.exit()

print('No')

Buggy submission (verdict: Runtime Error):
import sys

A = [[0] * 3 for i in range(3)]

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

N = int(input())
for _ in range(N):
    b = int(input())
    if b in A1:
        for a in [i for i, x in enumerate(A1) if x == b]:
            A[0][a] = 1
    if b in A2:
        for a in [i for i, x in enumerate(A2) if x == b]:
            A[1][a] = 1
    if b in A3:
        for a in [i for i, x in enumerate(A3) if x == b]:
            A[2][a] = 1

for i in range(3):
    if sum(A[i][:]) == 3:
        print('Yes')
        sys.exit()

if A[0][0] == 1 and A[1][0] == 1 and A[2][0] == 1:
    print('Yes')
    sys.exit()
if A[0][1] == 1 and A[1][1] == 1 and A[2][1] == 1:
    print('Yes')
    sys.exit()
if A[0][2] == 1 and A[1][2] == 1 and A[2][2] == 1:
    print('Yes')
    sys.exit()

if A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:
    print('Yes')
    sys.exit()

if A[0][2] == 1 and A[1][1] == 1 and A[3][0] == 1:
    print('Yes')
    sys.exit()

print('No')

Buggy submission (verdict: Runtime Error):
import sys

A = [[0] * 3 for i in range(3)]

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

N = int(input())
for _ in range(N):
    b = int(input())
    if b in A1:
        for a in [i for i, x in enumerate(A1) if x == b]:
            A[0][a] = 1
    if b in A2:
        for a in [i for i, x in enumerate(A2) if x == b]:
            A[1][a] = 1
    if b in A3:
        for a in [i for i, x in enumerate(A3) if x == b]:
            A[2][a] = 1

for i in range(3):
    if sum(A[i][:]) == 3:
        print('Yes')
        sys.exit()
    if sum(A[:][i]) == 3:
        print('Yes')
        sys.exit()

if A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:
    print('Yes')
    sys.exit()

if A[0][2] == 1 and A[1][1] == 1 and A[3][0] == 1:
    print('Yes')
    sys.exit()

print('No')
Problem p02850 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)

N = int(input())

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

result = [0]*(N-1)
def search(par, ans, own, par_num):
    ans =  max(ans, len(ki[own]))
    i = 1
    for child in ki[own]:
        if child[0] == par:
            continue
        else:
            if i == par_num:
                i += 1
            result[child[1]] = i
            ans = max(search(own, ans, child[0], i),ans)
            i += 1
    return ans

print(search(-1, 0, 0, -1))
for i in result:
    print(i)

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

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

def search(par, ans, own):
    ans =  max(ans, len(ki[own]))
    for child in ki[own]:
        if child == par:
            continue
        else:
            ans = max(search(own, ans, child),ans)
    return ans

print(search(-1, 0, 0))


def search(par, ans, own, par_num):
    ans =  max(ans, len(ki[own]))
    i = 1
    for child in ki[own]:
        if child == par:
            continue
        else:
            if i == par_num:
                i += 1
            print(i)
            ans = max(search(own, ans, child, i),ans)
            i += 1
    return ans

search(-1, 0, 0, -1)
Problem p02861 (python)

Fixed submission:
import itertools

N = int(input())
Town = []
for _ in range(N):
    Town.append(list(map(int, input().split())))

kyori = 0
num = 0
for v in itertools.permutations(Town, N):
    num += 1
    for i in range(N-1):
        kyori += ((v[i][0]-v[i+1][0])**2 + (v[i][1]-v[i+1][1])**2)**0.5

print(kyori/num)

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10**6)
input=sys.stdin.readline

def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p


X, Y = map(int, input().split())

if (X+Y)%3 != 0:
    print(0)
    sys.exit()

val = [X,Y]
val_min = min(val)

val_min_sho = int(val_min/3)

X_henkan = X - 3*val_min_sho
Y_henkan = Y - 3*val_min_sho
if (X_henkan == 0 and Y_henkan == 0):
    n = (val_min_sho)*2
    n_2 = int(n/2)
    print(comb(n,n_2,10**9+7))
elif Y_henkan != 0 and (X_henkan / Y_henkan == 2):
    n = (val_min_sho)*2 + Y_henkan
    n_2 = val_min_sho
    print(comb(n,n_2,10**9+7))
elif X_henkan != 0 and (Y_henkan / X_henkan == 2):
    n = (val_min_sho)*2 + X_henkan
    n_2 = val_min_sho
    print(comb(n,n_2,10**9+7))
else:
    print(0)
Problem p02899 (python)

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

B = [0]*N
j = 0
for i in A:
    j += 1
    B[int(i)-1] = j

resutl = ""
for i in B:
    resutl += (str(i) + " ")
print(resutl.rstrip())

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()

B = [0]*N
j = 0
for i in A:
    j += 1
    B[int(i)-1] = j
    if

resutl = ""
for i in B:
    resutl += (str(i) + " ")
print(resutl.rstrip())

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()

B = sorted(range(len(A)), key=lambda k: A[k])
resutl = ""
for i in B:
    resutl += (str(i+1) + " ")
print(resutl.rstrip())N = int(input())
A = input().split()

B = [0]*N
j = 0
for i in A:
    j += 1
    B[int(i)-1] = j

resutl = ""
for i in B:
    resutl += (str(i) + " ")
print(resutl.rstrip())
Problem p02923 (python)

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

ans = 0
tmp = 0
before = H[0]
for i in range(1, N):
    if before >= H[i]:
        tmp += 1
        before = H[i]
    else:
        ans = max(ans, tmp)
        tmp = 0
        before = H[i]

print(max(ans,tmp))

Buggy submission (verdict: Runtime Error):
num = int(input())
input_list = input().split()

i = 0
j = 1
tmp = 0L
score = 0L
while True:
    if j > (num - 1):
        break
    elif input_list[i] >= input_list[j]:
        tmp += 1
        i += 1
        j += 1
    else:
        if tmp > score:
            score = tmp
        tmp = 0
        i += 1
        j += 1
if tmp >= score:
    score = tmp
print(score)
Problem p03031 (python)

Fixed submission:
import copy

N,M = map(int, input().split())
jisho = [[] for i in range(N)]
for i in range(M):
    val = input().split()
    for j in val[1:]:
        jisho[int(j)-1].append(i)

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

sw = []
def create_ki(data):
    if len(data) == N:
        sw.append(data)
        return
    tmp = copy.copy(data)
    tmp.append(0)
    create_ki(tmp)
    tmp2 = copy.copy(data)
    tmp2.append(1)
    create_ki(tmp2)

create_ki([])

ans = 0
for val in sw:
    num = 0
    sw2 = [0]*M
    for i in val:
        if i == 0:
            num += 1
            continue
        data = jisho[num]
        for j in data:
            sw2[j] += 1
        num += 1
    cn = 0
    for j in sw2:
        if j % 2 != p[cn]:
            break
        cn += 1
    if cn == M:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
import copy

N,M = map(int, input().split())
jisho = [[] for i in range(N)]
for i in range(M):
    val = input().split()
    for j in val[1:]:
        jisho[int(j)-1].append(i)

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

sw = []
def create_ki(data):
    if len(data) == N:
        sw.append(data)
        return
    tmp = copy.copy(data)
    tmp.append(0)
    create_ki(tmp)
    tmp2 = copy.copy(data)
    tmp2.append(1)
    create_ki(tmp2)

create_ki([])

ans = 0
for val in sw:
    num = 0
    sw2 = [0]*M
    for i in val:
        if i == 0:
            num += 1
            continue
        data = jisho[num]
        for j in data:
            sw2[j] += 1
        num += 1
    cn = 0
    for j in sw2:
        if j % 2 == p[cn]:
            break
        cn += 1
    if cn == M:
        ans += 1

print(ans)
mac:128 ry
Problem p03032 (python)

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

ans = 0
for i in range(K+1):
    left = []
    if i != 0:
        left = V[:i]
    for j in range(K-i+1):
        right = []
        if j == 0:
            right = []
        elif (N-i) == 0:
            right = []
        elif i+j > N:
            continue
        else:
            right = V[-j:]
        for k in range(K-i-j+1):
            if k > i+j:
                continue
            sort_merge = sorted(left+right)
            if sum(sort_merge[k:]) == 990000000:
                print(sort_merge)
            ans = max(ans, sum(sort_merge[k:]))

print(ans)

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

ans = 0
for i in range(K+1):
    left = []
    if i != 0:
        left = V[:i]
    for j in range(K-i+1):
        right = []
        if j == 0:
            sort_merge = sorted(left+right)
            ans = max(ans, sum(sort_merge[k:]))
            continue
        elif (N-i) == 0:
            sort_merge = sorted(left+right)
            ans = max(ans, sum(sort_merge[k:]))
            continue
        elif i+j > N:
            right = V[-(N-i):]
        else:
            right = V[-j:]
        for k in range(K-i-j+1):
            if k > i+j:
                continue
            sort_merge = sorted(left+right)
            ans = max(ans, sum(sort_merge[k:]))

print(ans)
Problem p03044 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)

N = int(input())

tree = {}
for i in range(1,N):
    u, v, w = map(int, input().split())
    w = w%2
    if u in tree:
        tree[u].append([v,w])
    else:
        tree[u] = [[v,w]]

    if v in tree:
        tree[v].append([u,w])
    else:
        tree[v] = [[u,w]]

iro = [-1]*(N)
def seachTree(current, parent):
    if len(tree[current]) == 0:
        return

    for elms in tree[current]:
        if elms[0] == parent:
            continue
        if elms[1] == 0:
            iro[elms[0]-1] = iro[current-1]
        else:
            iro[elms[0]-1] = not iro[current-1]

        seachTree(elms[0], current)

iro[0] = False
seachTree(1, 0)
for val in iro:
    print(int(val))

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

tree = {}
for i in range(1,N):
    u, v, w = map(int, input().split())
    w = w%2
    if u in tree:
        tree[u].append([v,w])
    else:
        tree[u] = [[v,w]]

    if v in tree:
        tree[v].append([u,w])
    else:
        tree[v] = [[u,w]]

iro = [-1]*(N)
def seachTree(current, parent):
    if len(tree[current]) == 0:
        return

    for elms in tree[current]:
        if elms[0] == parent:
            continue
        if elms[1] == 0:
            iro[elms[0]-1] = iro[current-1]
        else:
            iro[elms[0]-1] = not iro[current-1]

        seachTree(elms[0], current)

iro[0] = False
seachTree(1, 0)
for val in iro:
    print(int(val))

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

tree = {}
for i in range(1,N):
    u, v, w = map(int, input().split())
    w = w%2
    if u in tree:
        tree[u].append([v,w])
    else:
        tree[u] = [[v,w]]

    if v in tree:
        tree[v].append([u,w])
    else:
        tree[v] = [[u,w]]

iro = [-1]*(N)
def seachTree(current, parent):
    if len(tree[current]) == 0:
        return

    for elms in tree[current]:
        if elms[0] == parent:
            continue
        if elms[1] == 0:
            iro[elms[0]-1] = iro[current-1]
        else:
            iro[elms[0]-1] = not iro[current-1]

        seachTree(elms[0], current)

print(tree)
iro[0] = False
seachTree(1, 0)
for val in iro:
    print(int(val))
Problem p03061 (python)

Fixed submission:
def gcd(x, y):
    while y != 0:
        x, y = y, x%y
    return x

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

L = [0]*(N+1)
R = [0]*(N+1)
for i in range(1, N+1):
    L[i] = gcd(L[i-1], A[i-1])
    R[N-i] = gcd(R[N-i+1], A[N-i])

ans = 0
for i in range(N):
    ans = max(ans, gcd(L[i],R[i+1]))

print(ans)

Buggy submission (verdict: Runtime Error):
import copy
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

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

ans = 0
for i in range(N):
    tmp = copy.copy(A)
    tmp.pop(i)
    ans = max(ans, gcd(*tmp))

print(ans)
Problem p03076 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

data_list = [A,B,C,D,E]
last_tmp = 10
last = 0
for data in data_list:
    data_str = str(data)
    if int(data_str[len(data_str)-1]) != 0:
        if last_tmp >= int(data_str[len(data_str)-1]):
            last = data
            last_tmp = int(data_str[len(data_str)-1])

if last != 0:
    data_list.remove(last)
ans = last
for data in data_list:
    ans += data
    data_str = str(data)
    if int(data_str[len(data_str)-1]) != 0:
        ans += 10-int(data_str[len(data_str)-1])

print(ans)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

data_list = [A,B,C,D,E]
last_tmp = 10
last = 0
for data in data_list:
    data_str = str(data)
    if int(data_str[len(data_str)-1]) != 0:
        if last_tmp >= int(data_str[len(data_str)-1]):
            last = data
            last_tmp = int(data_str[len(data_str)-1])

data_list.remove(last)
ans = last
for data in data_list:
    ans += data
    data_str = str(data)
    if int(data_str[len(data_str)-1]) != 0:
        ans += 10-int(data_str[len(data_str)-1])

print(ans)
Problem p03110 (python)

Fixed submission:
N = int(input())

ans = 0.0
for i in range(N):
    x,u = map(str, input().split())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*(380000)

print(ans)

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

ans = 0.0
for i in range(N):
    x,u = map(str, input().split())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*(380000)

print(ans)
mac:119 ryonakay$
Problem p03112 (python)

Fixed submission:
import bisect

A,B,Q = map(int, input().split())

S = []
for i in range(A):
    S.append(int(input()))

T = []
for i in range(B):
    T.append(int(input()))

ans = []
for i in range(Q):
    x = int(input())
    s = bisect.bisect_left(S, x)
    s = min([s,len(S)-1])
    kyori_s = S[s]
    st1 = min([bisect.bisect_left(T, kyori_s), len(T)-1])
    st2 = max([st1-1,0])
    kyori1 = abs(kyori_s-x) + min([abs(T[st1]-kyori_s),abs(T[st2]-kyori_s)])

    s = max([s-1,0])
    kyori_s = S[s]
    st1 = min([bisect.bisect_left(T, kyori_s), len(T)-1])
    st2 = max([st1-1,0])
    kyori2 = abs(kyori_s-x) + min([abs(T[st1]-kyori_s),abs(T[st2]-kyori_s)])

    t = bisect.bisect_left(T, x)
    t = min([t,len(T)-1])
    kyori_t = T[t]
    ts1 = min([bisect.bisect_left(S, kyori_t), len(S)-1])
    ts2 = max([ts1-1,0])
    kyori3 = abs(kyori_t-x) + min([abs(S[ts1]-kyori_t),abs(S[ts2]-kyori_t)])

    t = max([t-1,0])
    kyori_t = T[t]
    ts1 = min([bisect.bisect_left(S, kyori_t), len(S)-1])
    ts2 = max([ts1-1,0])
    kyori4 = abs(kyori_t-x) + min([abs(S[ts1]-kyori_t),abs(S[ts2]-kyori_t)])

    ans.append(min([kyori1,kyori2,kyori3,kyori4]))

for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
import bisect

A,B,Q = map(int, input().split())

S = []
for i in range(A):
    S.append(int(input()))

T = []
for i in range(B):
    T.append(int(input()))

ans = []
for i in range(Q):
    x = int(input())
    s = bisect.bisect_left(S, x)
    s = min([s,len(S)-1])
    kyori_s = S[s]
    st1 = min([bisect.bisect_left(T, kyori_s), len(T)-1])
    st2 = max([st1-1,0])
    kyori1 = abs(kyori_s-x) + min([abs(T[st1]-kyori_s),abs(T[st2]-kyori_s)])

    s = max([s-1,0])
    kyori_s = S[s]
    st1 = min([bisect.bisect_left(T, kyori_s), len(T)-1])
    st2 = max([st1-1,0])
    kyori2 = abs(kyori_s-x) + min([abs(T[st1]-kyori_s),abs(T[st2]-kyori_s)])

    t = bisect.bisect_left(T, x)
    t = min([t,len(T)-1])
    kyori_t = T[t]
    ts1 = min([bisect.bisect_left(S, kyori_t), len(S)-1])
    ts2 = max([st2-1,0])
    kyori3 = abs(kyori_t-x) + min([abs(S[ts1]-kyori_t),abs(S[ts2]-kyori_t)])

    t = max([t-1,0])
    kyori_t = T[t]
    ts1 = min([bisect.bisect_left(S, kyori_t), len(S)-1])
    ts2 = max([st2-1,0])
    kyori4 = abs(kyori_t-x) + min([abs(S[ts1]-kyori_t),abs(S[ts2]-kyori_t)])

    ans.append(min([kyori1,kyori2,kyori3,kyori4]))

for i in ans:
    print(i)
Problem p03262 (python)

Fixed submission:
from fractions import gcd

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

S = []
for i in range(N):
    S.append(abs(a-X[i]))

ans = S[0]
for i in range(1, N):
    ans = gcd(ans,S[i])

print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd

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

S = []
for i in range(N):
    S.append(abs(a-X[i]))

ans = S[0]
for i in range(1, N):
    ans = gcd(ans,S[i])

print(ans)
Problem p02639 (python)

Fixed submission:
l=list(map(int,input().split(" ")))
#print(l)
print(l.index(0)+1)

Buggy submission (verdict: Runtime Error):
l=list(map(int,input.split(" ")))
print(l.index("0")+1)
Problem p02687 (python)

Fixed submission:
s = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
s = input()
s[1] = "R"
print(s)
Problem p02743 (python)

Fixed submission:
a,b,c = map(int,input().split(" "))
if (c-a-b)**2 > a*b*4 and c > a + b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
a,b,c = map(int(input().split()))
if ((math.sqrt(a) + math.sqrt(b)) < math.sqrt(c)):
  print("Yes")
else:
  print("No")
Problem p02658 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if 0 in a:
  print(0)
else:
  p = 1
  f = True
  for i in a:
    p *= i
    if(p > 1000000000000000000):
      f = False
      break
  if(f):
    print(p)
  else:
    print(-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
if 0 in a:
  print(0)
else:
  p = 1
  f = True
  for i in a:
    p *= i
    if(p > 1000000000000000000):
      f = false
      break
  if(f):
    print(p)
  else:
    print(-1)
Problem p02639 (python)

Fixed submission:
x = list(map(int, input().split()))
print(x.index(0)+1)

Buggy submission (verdict: Runtime Error):
x = list(map(int, input.split()))
print(x.index(0))

Buggy submission (verdict: Runtime Error):
x = list(map(int, input.split()))
print(15 - sum(x))
Problem p02700 (python)

Fixed submission:
[A, B, C, D] = list(map(int, input().split()))
while A > 0:
    C -= B
    if C <= 0:
        print('Yes')
        break
    A -= D
    if A <= 0:
        print('No')
        break

Buggy submission (verdict: Runtime Error):
[A, B, C, D] = list(map(int, input().split()))
X = A / D
Y = C / B
if (X - Y) > 1 
    print('Yes')
else:
    if Y > X:
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
[A, B, C, D] = list(map(int, input().split()))
X = A / D
Y = B / C
if X >= Y:
    prinT('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
[S, W] = list(map(int, input().split()))
if W >= S:
    print('unsafe')
else:
    print('safe')
Problem p02717 (python)

Fixed submission:
list1 = list(map(int, input().split()))
list2= []
list2.append(list1[2])
list2.append(list1[0])
list2.append(list1[1])
print(list2[0], list2[1], list2[2])

Buggy submission (verdict: Runtime Error):
list1 = list(map(int, input().split()))
list2= []
list2[0] = list1[2]
list2[1] = list1[0]
list2[2] = list1[1]
print(list2)
Problem p02765 (python)

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

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

Fixed submission:
N = int(input())
if (N % 1000 == 0):
    m = (int(N/1000))
else:
    m=(int(N/1000)+1)
change=1000*m-N
print(change)

Buggy submission (verdict: Runtime Error):
N=int(input())
if(N%1000==0):
  m=(int(N/1000)
else:
  m=(int(N/1000)
change=1000*m-N
print(change)

Buggy submission (verdict: Runtime Error):
N=int(input())
if (N%1000=0):
  m=(int(N/1000)
else:
  m=(int(N/1000)
change=1000*m-N
print(change)

Buggy submission (verdict: Runtime Error):
N=int(input())
m
change=int(N%1000)+1-N
print(change)
Problem p03971 (python)

Fixed submission:
"""Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py"""
N, A, B = map(int, input().split())
S = str(input())

RANK_a = 0
RANK_b = 0

for i in range(N):
    if S[i] == "a":
        if RANK_a+RANK_b < A+B:
            RANK_a += 1
            print("Yes")
        else:
            print("No")
    elif S[i] == "b":

        if RANK_a+RANK_b < A+B:
            if RANK_b < B:
                RANK_b += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        
        print("No")

Buggy submission (verdict: Runtime Error):
"""Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py"""
import numpy as np
import sys

N, A, B = map(int, input().split())
S = str(input())

for i in range(len(N)):
    if(S[i] == "c"):
        print("No")
    else:
        if(i >= A+B):
            print("No")
        else:
            if(S[i] == "b" and i < B):
                print("No")
            else:
                print("Yes")
Problem p02946 (python)

Fixed submission:
k, x = map(int, input().split())
print(*list(range(x-k+1, x+k)))

Buggy submission (verdict: Runtime Error):
k, x = input().split()
print(*list(range(x-k+1, x+k)))