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

Fixed submission:
S = input()
count = 0
ans = 0
for s in S:
    if s in "ACGT":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0
    if ans < count:
        ans = count
        
print(ans)

Buggy submission (verdict: Runtime Error):
enki = {"A":"T", "C":"G", "G":"C", "T":"A"}
print(enki[str(input())])
Problem p03106 (python)

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

a = [i for i in range(1, A+1) if A % i == 0]
b = [i for i in range(1, B+1) if B % i == 0]
ans = set(a) & set(b)
print(sorted(list(ans))[-K])

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

a = [i for i in range(1, A+1) if A % i == 0]
b = [i for i in range(1, B+1) if B % i == 0]
ans = set(a) & set(b)
print(list(ans)[K])
Problem p02628 (python)

Fixed submission:
def main():
  N, K = map(int, input().split())

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

  price.sort()

  part = price[0:K]

  print(sum(part))

if __name__ == '__main__':
  main()

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

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

  price.sort()

  part = price[0:K]

  print(sum(part))

if __name__ == '__main__':
  main()

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

	price = list(map(int, input().split()))
	
	price.sort()

	part = price[0:K]

	print(sum(part))

if __name__ == '__main__':
    main()

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

	list = []

	for i in range(N):
		list.append(int(input()))
	
	list.sort()

	part = list[0:K]

	print(sum(part))

if __name__ == '__main__':
    main()
Problem p02640 (python)

Fixed submission:
x,y = map(int, input().split())
list = []
ans = 0
for i in range(x) :
    list.append(4)

if sum(list) == y:
    print('Yes')
    ans = 1

else :
    for i in range(x) :
        list.remove(4)
        list.append(2)
        if sum(list) == y:
            print('Yes')
            ans = 1
            break

    if ans == 0:
        print('No')

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
p = []
ans = 0
z=x+1

for i in range(x):
    p.append(4)

for a in range(z):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    if (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
p = []
ans = 0
z=x+1

for i in range(x):
    p.append(4)

for i in range(z):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    if (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x+1):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    elif (y==4)&(x==1):
        print('Yes')
    else :
        print('No')
Problem p02657 (python)

Fixed submission:
val1,val2 = (int(x) for x in input().split())

print(int(val1) * int(val2))

Buggy submission (verdict: Runtime Error):
val1 = input()
val2 = input()

print(int(val1) * int(val2))
Problem p02628 (python)

Fixed submission:
N,K = tuple(map(int,input().split(" ")))
cont = sorted(list(map(int,input().split(" "))))
print(sum(cont[:K]))

Buggy submission (verdict: Runtime Error):
N,K = tuple(map(int,input.split(" ")))
cont = list(map(int,input.split(" ")))
print(sum(cont[:K]))
Problem p02952 (python)

Fixed submission:
n=int(input())
n_d=len(str(n))
ans=0
if n_d >1:
	for i in range(1,n_d,2):
		part1=9
		part2=10**i
		total=part1*part2
		total=total//10
		ans+=total
if n_d%2!=0:		
	part1=10**(n_d-1)
	part2=n-part1
	ans+=(part2+1)
print(int(ans))
# your code goes here

Buggy submission (verdict: Runtime Error):
n=int(input())
n_d=len(str(n))
ans=1
for i in range(1,n,2):
	part1=9
	part2=10**i
	total=part1*part2
	total/=10
	ans+=total
part1=10**n
part2=n-part1
ans+=(part2+1)
print(ans)
Problem p02628 (python)

Fixed submission:
N,K = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
ans = 0
for i,v in enumerate(p):
    ans += v
    if i == K - 1:
        print(ans)
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
for i,v in enumerate(p):
    ans += v
    if i == 2:
        print(ans)
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
print(p[0]+p[1]+p[2])
Problem p02903 (python)

Fixed submission:
H,W,A,B = map(int, input().split())

W1 = '1' * A + '0' * (W - A)
W0 = '0' * A + '1' * (W - A)

if A > (W // 2) or B > (H // 2):
    print('No')
    exit()

if H == 1:
    print(W1)
    exit()
elif W == 1:
    for _ in range(B):
        print('1')
    for _ in range(H - B):
        print('0')
    exit()


ans = []
ans.append(W1)

for _ in range(B):
    ans.append(W0)

for _ in range(H - B - 1):
    ans.append(W1)

for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
H,W,A,B = map(int, input().split())

W1 = '1' * A + '0' * (W - A)
W0 = '0' * A + '1' * (W - A)

if A > (H // 2) or B > (W // 2):
    print('No')
    exit()

if H == 1:
    print(W1)
    exit()
elif W == 1:
    for _ in range(B):
        print('1')
    for _ in range(H - B):
        print('0')
	    exit()


ans = []
ans.append(W1)

for _ in range(B):
    ans.append(W0)

for _ in range(H - B - 1):
    ans.append(W1)

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

Fixed submission:
import itertools
L,R = map(int, input().split())
if (R - L) + 1 >= 2019:
        print(0)
        exit()
elif (R - L) + 1 >= 673:
        print(0)
        exit()

if (R - 1) * R < 2019:
        print(L * R)
        exit()


if L % 2019 == 0:
        print(0)
        exit()
elif L % 673 < R % 673:
        li = range(L, R + 1)
        cmb = list(itertools.combinations(li,2))
        ans = (R-1) * R
        for i,j in cmb:
                ans = min(ans, (i*j) % 2019)
        print(ans)

else:
        print(0)
        exit()

Buggy submission (verdict: Runtime Error):
L,R = map(int, input().split())
if L * R < 2019:
        print(L * R)
        exit()

if R - L >= 2019:
        print(0)
        exit()

li=range(L, R)
tmp = []
for i in range(min(2019 * 2, R - L)):
        if li[i] % 2019 == 0:
                print(0)
                exit()
        tmp.append(li[i] % 2019)
tmp.sort()

print(tmp[0]* tmp[1])

Buggy submission (verdict: Runtime Error):
L,R = map(int, input().split())
if L * R < 2019:
        print(L * R)
        exit()

if R - L >= 2019:
        print(0)
        exit()

li=range(L, R)
tmp = []
for i in range(min(2019, R - L)):
        if li[i] % 2019 == 0:
                print(0)
                exit()
        tmp.append(li[i] % 2019)
tmp.sort()

print(tmp[0]* tmp[1])
Problem p03006 (python)

Fixed submission:
from collections import Counter
import itertools

N = int(input())
xy = [list(map(int, input().split())) for i in range(N)]
xy.sort()
if N == 1:
        print(1)
        exit()

ptn=list(itertools.combinations(xy,2))
pq=[]
for idx,val in enumerate(ptn):
        if val[1][0]-val[0][0] <= 0 and val[1][1]-val[0][1] <= 0:
                pq.append(str(abs(val[1][0]-val[0][0])) + 'x' + str(abs(val[1][1]-val[0][1])))
        else:
                pq.append(str(val[1][0]-val[0][0]) + 'x' + str(val[1][1]-val[0][1]))

cpq = Counter(pq)

# pqans=cpq.most_common(1)[0][0]
redsc=cpq.most_common(1)[0][1]

# p,q = map(int,pqans.split('x'))
print(N-redsc)

Buggy submission (verdict: Runtime Error):
from collections import Counter
import itertools

N = int(input())
xy = [list(map(int, input().split())) for i in range(N)]

ptn=list(itertools.combinations(xy,2))
pq=[]
for idx,val in enumerate(ptn):
        pq.append(str(val[1][0]-val[0][0]) + 'x' + str(val[1][1]-val[0][1]))

cpq = Counter(pq)

for i in range(1,N):
        pqans=cpq.most_common(i)[0][0]
        if pqans != '0x0':
                redsc=cpq.most_common(i)[0][1]
                break


print(N-redsc)

Buggy submission (verdict: Runtime Error):
from collections import Counter
import itertools

N = int(input())
xy = [list(map(int, input().split())) for i in range(N)]


ptn=list(itertools.combinations(xy,2))
pq=[]
for idx,val in enumerate(ptn):
        pq.append(str(val[1][0]-val[0][0]) + 'x' + str(val[1][1]-val[0][1]))

cpq = Counter(pq)

# pqans=cpq.most_common(1)[0][0]
redsc=cpq.most_common(1)[0][1]

# p,q = map(int,pqans.split('x'))

print(N-redsc)
Problem p03079 (python)

Fixed submission:
A,B,C = map(int, input().split())
print('Yes') if A+B>C and C+B>A and A+C>B and A==B and B==C else print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
print('Yes') if A+B/C*2 == 1 print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
print('Yes') if abs(A-B)<C and A+B>C and A=B and B=C else print('No')
Problem p03086 (python)

Fixed submission:
S = list(input())
ansarr = []
ans = 0
ansarr.append(ans)
for i in S:
    if ans == 0:
        if i == 'A' or i == 'C' or i == 'G' or i == 'T':
            ans += 1
    else:
        if i == 'A' or i == 'C' or i == 'G' or i == 'T':
            ans += 1
        elif i != 'A' or i != 'C' or i != 'G' or i != 'T':
            ansarr.append(ans)
            ans = 0
else:
    ansarr.append(ans)


print(max(ansarr))

Buggy submission (verdict: Runtime Error):
S = list(input())
ansarr = []
ans = 0
for i in S:
    if ans == 0:
        if i == 'A' or i == 'C' or i == 'G' or i == 'T':
            ans += 1
    else:
        if i == 'A' or i == 'C' or i == 'G' or i == 'T':
            ans += 1
        elif i != 'A' or i != 'C' or i != 'G' or i != 'T':
            ansarr.append(ans)
            ans = 0

print(max(ansarr))
Problem p03087 (python)

Fixed submission:
N,Q = map(int, input().split())
S = input()
lrs = [list(map(int, input().split())) for i in range(Q)]

total = []
total.append(0)
for i in range(1, N):
    if S[i - 1] == 'A' and S[i] == 'C':
        total.append(1)
    else:
        total.append(0)
totsum = 0
for idx, val in enumerate(total):
    totsum += val
    total[idx] = totsum

for lr in lrs:
    print(total[lr[1] - 1] - total[lr[0] - 1])

Buggy submission (verdict: Runtime Error):
N,Q = map(int, input().split())
S = input()
lr = [list(map(int,input().split())) for i in range(Q)]

cnt_max = S.count('AC')
d = 0
for i in range(Q):
    d = lr[i][1] - lr[i][0]
    loss = 0
    if d * 2 > len(S):
        s_tmp = S[max(lr[i][0] - 1, 0):lr[i][1]]
        print(s_tmp.count('AC'))
    else:
        s_tmp_bef = S[:lr[i][0] - 1]
        s_tmp_aft = S[lr[i][1]:]
        if s_tmp_bef[-1] == 'A' and S[lr[i][0] - 1] == 'C':
            loss += 1
        if s_tmp_aft[0] == 'C' and S[lr[i][1] - 1] == 'A':
            loss += 1
        print(cnt_max - loss - s_tmp_bef.count('AC') - s_tmp_aft.count('AC'))
Problem p03102 (python)

Fixed submission:
N,M,C = map(int, input().split())
B = list(map(int, input().split()))
A = []
counter = 0
for i in range(N):
    A.append(list(map(int, input().split())))
    val = 0
    for j in range(M):
        val += A[i][j] * B[j]
    else:
        if val + C > 0:
            counter += 1 
print(counter)

Buggy submission (verdict: Runtime Error):
N,M,C = map(int, input().split())
B = list(map(int, input().split()))
A = []
counter = 0
for i in range(N):
    A.append(list(map(int, input().split())))
    val = 0
    for j in range(M):
        val += A[i][j] * B[j]
    else:
        if val + C > 0:
            count += 1 
print(count)
Problem p03125 (python)

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

Buggy submission (verdict: Runtime Error):
A,B = map(input().split())
print(A + B) if B % A == 0 else print(B - A)
Problem p03161 (python)

Fixed submission:
N,K = map(int, input().split())
h = list(map(int, input().split()))
 
dp = [0] * N
for i in range(1, N):
    if i // K == 0:
        bef = i
    else:
        bef = K
    tmp = []
    for j in range(1, bef + 1):
        tmp.append(dp[i - j] + abs(h[i] - h[i - j]))
    dp[i] = min(tmp)
 
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
 
dp = [0] * N
for i in range(0, N):
    if i // K == 0:
        bef = i
    else:
        bef = K
    tmp = []
    for j in range(1, bef + 1):
        tmp.append(dp[i - j] + abs(h[i] - h[i - j]))
    dp[i] = min(tmp)
 
print(dp[-1])
Problem p03273 (python)

Fixed submission:
H,W = map(int, input().split())
a = [list(input()) for i in range(H)]
a = [x for x in a if '#' in x]

aT = list(zip(*a))
aT = [x for x in aT if '#' in x]
ans = list(zip(*aT))

for i in ans:
    print("".join(i))

Buggy submission (verdict: Runtime Error):
H,W = map(int, input().split())
a = [list(input()) for i in range(W)]
a = [x for x in a if '#' in x]

aT = list(zip(*a))
aT = [x for x in aT if '#' in x]
ans = list(zip(*aT))

for i in ans:
    print("".join(i))
Problem p03316 (python)

Fixed submission:
N = int(input())
ln = list(str(N))
sumln = 0
for val in ln:
    sumln += int(val)

print('Yes') if N%sumln == 0 else print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
ln = list(N)
print('Yes') if N%sum(ln) == 0 else print('No')
Problem p03386 (python)

Fixed submission:
A,B,K = map(int, input().split())
lcnt = 0
rcnt = 0
ans = []
for i in range(A, min(A + K, B)):
    ans.append(i)

for i in range(max(B - K + 1, A), B + 1):
    ans.append(i)

set_ans = list(set(ans))
set_ans.sort()
for i in set_ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int, input().split())
var = list(range(A, B + 1))
ans = var[0:K]
ans += var[-K:]
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int, input().split())
var = list(range(A, B + 1))
ans = var[0:K]
ans += var[-K:]
ans = set(ans)
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int, input().split())
var = list(range(A, B + 1))
print(var)
ans = var[0:2]
ans += var[-2:]

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

Fixed submission:
s = input()
left = 0
right = 0

for idx, val in enumerate(s):
        if val == 'A':
                left = idx
                break

for idx, val in enumerate(reversed(s)):
        if val == 'Z':
                right = idx
                break

print(len(s) - left - right)

Buggy submission (verdict: Runtime Error):
s = input()
cnt = 0
cntflg = False
endflg = False
for i in s:
        if i == 'Z' and cntflg:
                cnt += 1
                endflg = True
        elif i == 'Z' and endflg:
                cnt += 1
        elif endflg
                break
        elif cntflg:
                cnt += 1
        elif i == 'A' and not(cntflg):
                cnt = 1
                cntflg = True

print(cnt)

Buggy submission (verdict: Runtime Error):
s = input()
cnt = 0
cntflg = True
for i in s:
  if i == 'Z':
    break
  elif cntflg:
    cnt += 1
  elif i == 'A'
  	cnt = 1
    cntflg = True

print(cnt)
Problem p02628 (python)

Fixed submission:
import collections

s = [int(i) for i in input().split(" ")]
p = [int(i) for i in input().split(" ")]
p.sort()
a = []

for i in range(0,s[1]):
	a.append(p[i])
print(sum(a))

Buggy submission (verdict: Runtime Error):
import collections

s = [int(i) for i in input().split(" ")]
print(s)
p = [int(i) for i in input().split(" ")]
print(p)
a = []
p.sort()
print(p)

for i in range(0,s[1]):
	a = p[i]
b = [int(b) for b in a]
print(sum(b))
Problem p02719 (python)

Fixed submission:
N, K = [int(i) for i in input().split(" ")]

def replace(a,b):
    if a < abs(a - b):
        return a
    else:
        return replace(abs(a - b), b)

if K == 0:
    print(N)
elif N % K == 0:
    print(0)
else:
    print(replace(N%K, K))

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split(" ")]

def replace(a,b):
    if a < abs(a - b):
        return a
    else:
        return replace(abs(a - b), b)

if K == 0:
    print(N)
elif N % K == 0:
    print(0)
else:
    print(replace(N, K))
Problem p02761 (python)

Fixed submission:
N,M = [int(i) for i in input().split(" ")]
check_list = []

for _ in range(M):
    check_list.append([int(i) for i in input().split(" ")])

for i in range(10 ** N):
    i = str(i)
    if len(i) != N:
        continue

    for j in check_list:
        if i[j[0] - 1] != str(j[1]):
            break
        else:
            continue
    else:
        print(i)
        break
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N,M = [int(i) for i in input().split(" ")]
check_list = []

for _ in range(M):
    check_list.append([int(i) for i in input().split(" ")])

for i in range(10 ** (N + 1)):
    i = str(i)
    for j in check_list:
        if i[j[0] - 1] != str(j[1]):
            break
        else:
            continue
    else:
        print(i)
        break
else:
    print(-1)
Problem p02921 (python)

Fixed submission:
s = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    a += 1
    
print(a)

Buggy submission (verdict: Runtime Error):
S = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    a += 1
    
print(a)
Problem p02969 (python)

Fixed submission:
r = int(input())
print(3 * r**2 )

Buggy submission (verdict: Runtime Error):
r = input()
print(3 * r**2)
Problem p02972 (python)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split(" ")]

sum_index = [0]*(N+1)
index = []
for i in range(N)[::-1]:
    sum_ = 0
    for j in sum_index[i+1::i+1]:
        sum_ ^= j
    sum_index[i+1] = sum_ ^ A[i]
    if sum_index[i+1] == 1:
        index.append(str(i+1))

print(sum(sum_index))
if index:
    print(" ".join(index))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for _ in range(N)]

sum_index = [0]*(N+1)

for i in range(N)[::-1]:
    sum_ = 0    
    for j in sum_index[i+1::i+1]:
        sum_ ^= j
    sum_index[i+1] = sum_ ^ A[i] 
print(sum(sum_index))
print(sum_index[1:])
Problem p03079 (python)

Fixed submission:

line = [int(i) for i in input().split(" ")]
b = line[0]
flag = 0
for i in line:
    if i != b:
        flag = 1
if flag == 1:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
while True:
    line = [int(i) for i in input().split(" ")]
    b = line[0]
    flag = 0
    for i in line:
        if i != b:
            flag = 1
    if flag == 1:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
a = int(input())
line = [i for i in a if i]
b = line[0]
for i in line:
  if i != b:
    return print("No")
print("Yes")
Problem p03533 (python)

Fixed submission:
import re
pattern = r"^A?KIHA?BA?RA?$"
S = input()
if re.match(pattern,S):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
st = [i for i in "AKIHABARA"]
input_st = [i for i in input()]
if input_st[-1] != "A":
    input_st.append("A")
for ind,str_ in enumerate(st):
    if str_ != input_st[ind]:
        input_st.insert(ind,"A")
    else:
        pass
if "".join(st) == "".join(input_st):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
st = [i for i in "AKIHABARA"]
input_st = [i for i in input()]
if input_st[-1] != "A":
    input_st.append("A")
for ind,str_ in enumerate(st):
    if str_ != input_st[ind]:
        input_st.insert(ind,"A")
    
if "".join(st) == "".join(input_st):
    print("YES")
else:
    print("NO")
Problem p02945 (python)

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

Buggy submission (verdict: Runtime Error):
lis_raw=[int(i) for i in input().split()]
print(max(lis[0]+lis[1], lis[0]-lis[1], lis[0]*lis[1]))

Buggy submission (verdict: Runtime Error):
lis_raw=input().split()
lis = [int(i) for i in lis]
print(max(lis[0]+lis[1], lis[0]-lis[1], lis[0]*lis[1]))
Problem p02645 (python)

Fixed submission:
name = input()
print(name[:3])

Buggy submission (verdict: Runtime Error):
  print(input()[:3])
Problem p02843 (python)

Fixed submission:
X=input()
Xi=int(X)
if Xi>=100:
    if len(X)>=4 and Xi>=2000:
        print(1)
    else:
        if Xi<1000:
            print(1 if int(X[0])*5>=int(X[1:3]) else 0)
        else:
            print(1 if int(X[0:2])*5>=int(X[2:4]) else 0)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
X=input()
m=int(X[0])
t=int(X[1:3])
print(1 if m*5>=t or len(X)>=4 else 0)

Buggy submission (verdict: Runtime Error):
X=input()
m=int(X[0])
t=int(X[1:3])
print(1 if m*5>=t else 0)
Problem p03609 (python)

Fixed submission:
X, t = map(int,input().split())
print(X-t if X>=t else 0)

Buggy submission (verdict: Runtime Error):
X=int(input())
t=int(input())
print(X-t if X>=t else 0)
Problem p03844 (python)

Fixed submission:
a,b,c= map(str,input().split())
a=int(a)
c=int(c)
if b=="+":
    print(a+c)
else:
    print(a-c)

Buggy submission (verdict: Runtime Error):
a,b,c= map(str,input().split())
a=int(a)
c=int(c)
if b=="+":
    print(a+c)
else:
    print(a-b)
Problem p04043 (python)

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

sums=0
for i in num:
	sums+=i
  
if sums ==17:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
N,_ = map(str,input().split())
lists = [0,1,2,3,4,5,6,7,8,9]
s=list(map(int,input().split()))
price=""
flg=False

for i in s:
    lists.remove(i)

for i in N:
    for j,n in enumerate(lists):
        if int(i) <= int(j):
            price+=str(j)
            break
        if len(lists)==n:
            price+=str(lists[0])
            flg=True
#先頭0の場合
if lists[0]==0: lists.remove(0)
#繰り上がりの場合
if flg: price=str(lists[0])+price

print(price)

Buggy submission (verdict: Runtime Error):
num = list(map(input().split("")))

sums=0
for i in num:
	sums+=i
  
if sums ==17:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = list(map(input()))

sums=0
for i in num:
	sums+=i
  
if sums ==17:
	print("YES")
else:
	print("NO")
Problem p02717 (python)

Fixed submission:
x,y,z=map(int,input().split())
print(z,x,y)

Buggy submission (verdict: Runtime Error):
X, Y, Z = map(int, input().split())
 
print(Z+" "+X+" "+Y)

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

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

Buggy submission (verdict: Runtime Error):
x, y, z = map(int, input().split())

print(z+""+x+""+y)

Buggy submission (verdict: Runtime Error):
x,y,z= map(int, input().split())

print(z+""+x+""+y)

Buggy submission (verdict: Runtime Error):
x,y,z= map(int, input().split())

print(z x y)

Buggy submission (verdict: Runtime Error):
x=input()
y=input()
z=input()

print(z x y)

Buggy submission (verdict: Runtime Error):
x=input()
y= input()
z= input()

print(z x y)

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

print(z x y)
Problem p02724 (python)

Fixed submission:
x=int(input())

a=x//500

b=(x-a*500)//5

print(1000*a+5*b)

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

a=int(x%500)

b=int((x-a*500)%5)

c=1000*a+5*b

print(c)

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

a=int(x%500)

b=int((x-a)%5)

c=1000*a+5*b

print(c)

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

a=int(x//500)

b=int((x-a)//5)

c=1000*a+5*b

print(c)