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

Fixed submission:
from sys import stdin
 
input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))
 
if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
from sys import stdin
 
input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))
 
if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No)

Buggy submission (verdict: Runtime Error):
from sysimport stdin

input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))

if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No)
Problem p03673 (python)

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

forward = True
sec, first = [], []
for i in range(n):
    if i%2:
        first.append(a[i])
    else:
        sec.append(a[i])
arr = first[::-1] + sec
if len(first) != len(sec):
    arr = arr[::-1]

for el in arr:
    print(el, end=' ')

Buggy submission (verdict: Runtime Error):
from collections import deque

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

order = n%2
ans = deque([])
for i in range(n):
    if i%2 == order:
        ans.append(a[i])
    else:
        ans.appendleft(a[i])
print(' '.join(ans))

Buggy submission (verdict: Runtime Error):
from collections import deque

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

order = n%2
ans = deque([])
for i in range(n):
    if i & 1 == order:
        ans.append(a[i])
    else:
        ans.appendleft(a[i])
print(' '.join(ans))
Problem p03796 (python)

Fixed submission:
MOD = 10**9 + 7
n = int(input())
start = 1
for i in range(2, n+1):
    start *= i
    start %= MOD
print(start)

Buggy submission (verdict: Runtime Error):
n = int(input())
start = 1
for i in range(2, n+1):
    start *= i
    start %= MOD
print(start)
Problem p03845 (python)

Fixed submission:
n = int(input())
t = [0] + list(map(int, input().split()))

summ = sum(t)

for _ in range(int(input())):
    p, x = map(int, input().split())
    print(summ + x-t[p])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split())
t = [0] + t
maxRed = 0
for _ in range(int(input())):
    p, x = map(int, input().split())
	maxRed = max(maxRed, t[p]-x)
print(sum(t)-maxRed)
Problem p02718 (python)

Fixed submission:
N,M=map(int,input().split())
l=list(map(int,input().split()))
limit=sum(l)/(M*4)
num=0
for i in l:
  if i >= limit:
    num+=1
if num >=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=int(input().split())
l=list(map(int,input().split()))
limit=sum(l)/(M*3)
num=0
for i in l:
  if i >= limit:
    num+=0
if num >=M:
  print("Yes")
else:
  print("No")
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)

Buggy submission (verdict: Runtime Error):
S = inputs()
T = inputs()
print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)
Problem p02999 (python)

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

if xa[0] < xa[1]:
  print(0)
else:
  print(10)

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

if x < a:
  print(0)
else:
  print(10)
Problem p03000 (python)

Fixed submission:
in1 = list(map(int, input().split()))
N = in1[0]
X = in1[1]
 
L = list(map(int, input().split()))
L.append(0)
L.append(0)
D = 0
overflow = False
for i in range(1, N+2):
  if X < D:
    print(i-1)
    overflow = True
    break
  if X == D:
    print(i)
    overflow = True
    break
  D = D + L[i-1]

if not overflow:
  print(N+1)

Buggy submission (verdict: Runtime Error):
in1 = list(map(int, input().split()))
N = in1[0]
X = in2[1]

L = list(map(int, input().split()))
D = [0] * 10000

for i in range(1, N):
  D[i] = D[i-1] + L[i-1]
  if X < D[i]:
    print(D[i-1])
Problem p03807 (python)

Fixed submission:
numInput = int(input())

numSequence = list(map(int, input().split(' ')))

numOdd = 0
for i in range(0, len(numSequence)):
    if numSequence[i] % 2 == 1:
        numOdd += 1
        
if numOdd % 2 == 0:
    print('YES')
else:
    print('NO')

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

amount = numInput
numOdd = int(numInput / 2) + (numInput % 2)
numEven 0 int(numInput / 2)

while True:

    if amount >= 2:
        if numOdd >= 2:
            numOdd -= 2
            numEven += 1
            amount -= 1
        else:
            numEven -= 1
            amount -= 1
    else:
        break

if amount == 1:
    print('YES')
else:
    print('NO')
Problem p03814 (python)

Fixed submission:
input_line = raw_input()

idx_start = 0
while input_line[idx_start] != 'A':
    idx_start += 1

idx_end = len(input_line)
while input_line[idx_end-1] != 'Z':
    idx_end -= 1

print(idx_end - idx_start)

Buggy submission (verdict: Runtime Error):
input_line = raw_input()

idx_start = 0
while input_line[idx_start] != 'A':
    idx_start += 1

idx_end = len(input_line)
while input_line[idx_end-1] != 'Z':
    idx_end -= 1

print(idx_end - idx_start)
Problem p02841 (python)

Fixed submission:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
print(1) if d2 == 1 else print(0)

Buggy submission (verdict: Runtime Error):
x = int(input())
k = x//100
print(1) if 100*k <= x and x<= 105*k else print(0)
Problem p03471 (python)

Fixed submission:
n,p = map(int,input().split())
res10000 = res5000 = res1000 = -1
x = y = 0
end = False
for x in range(n+1):
    if end:
        break
    for y in range(n+1-x):
        if x*10000+y*5000+ (n-(x+y))*1000 == p:
            res10000 = x
            res5000 = y
            res1000 = n-(x+y)
            end = True
print('{} {} {}'.format(res10000,res5000,res1000))

Buggy submission (verdict: Runtime Error):
n = int(input()) #お札の枚数
p = int(input()) #目標金額

x = p//10000
y = (p - x*10000)//5000
z = int((p - x*10000 - y*5000)/1000)
if x+z+y>n:
    x = y = z = -1
print('{} {} {}'.format(x,y,z))
Problem p02687 (python)

Fixed submission:
k = {"ABC":"ARC","ARC":"ABC"}
print(k[input()])

Buggy submission (verdict: Runtime Error):
k = ["ABC":"ARC","ARC":"ABC"]
print(k[input()])
Problem p02741 (python)

Fixed submission:
a = '1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51'.split(",")
print(a[int(input())-1])

Buggy submission (verdict: Runtime Error):
a = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51".split(",")
print(a[int(input())])
Problem p02742 (python)

Fixed submission:
num = input().split(" ")
if "1" in num:
  print(1)
else:
	gu = int(num[1]) // 2
	ki = int(num[1]) - int(gu)
	gu2 = int(num[0]) // 2
	ki2 = int(num[0]) - int(gu2)
	print(gu * gu2 + ki * ki2)

Buggy submission (verdict: Runtime Error):
num = input().split(" ")
ki = int(num[1]) - gu
gu = int(num[1]) // 2
sum_kaku = 0
a = 0
while a < int(num[0]):
  if a % 2 == 0:
    sum_kaku += ki
  else:
    sum_kaku += gu
  a += 1
print(sum_kaku)
Problem p02958 (python)

Fixed submission:
N = int(input())
p = list(map(int,input().split(' ')))
p1 = p.copy()
p1.sort()
for i in range(N):
    for i1 in range(i,N):
        p2 = p.copy()
        p2[i],p2[i1] = p2[i1],p2[i]
        if p2 == p1:
            print("YES")
            exit()
print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
p = list(map(int,input().split(' ')))
p1 = p.copy()
p1.sort()
for i in range(N):
    for i1 in range(i,N):
        p2 = p.copy()
        p2[i],p2[i1] = p2[i1],p2[i]
        if p2 == p1:
            print("YES")
            exit()
print("NO")
Problem p03037 (python)

Fixed submission:
N,M = map(int,input().split())
lmax,mmin = 0,1000000
for i in range(M):
    l,m = map(int,input().split())
    if lmax < l:
        lmax = l
    if mmin > m:
        mmin = m

if lmax > mmin:
    ans = 0
elif lmax == mmin:
    ans = 1
else:
    ans = mmin-lmax
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
import bisect
N,M = map(int,input().split())
L_list,M_list = [],[]
for i in range(M):
    l,m = map(int,input().split())
    L_list.append(l)
    M_list.append(m)

L_list.sort()
M_list.sort()
lmax = L_list[-1]
mmin = M_list[0]
min = bisect.bisect_left(n,lmax)
max = bisect.bisect_left(n,mmin)
if min == max:
    ans = 1
else:
    ans = max - min
    ans += 1
print(ans)
Problem p03219 (python)

Fixed submission:
import math
x,y = map(int,input().split())

y = x + y / 2

print(math.floor(y))

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

y = x + y / 2
print(f"{y:.0f}")
Problem p03338 (python)

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

count = []

if len(S) == 2:
    if S[0] == S[1]:
        count.append(1)
    else:
        count.append(0)
else:
    for i in range(1,N-1):
        sum = 0
        sita = S[0:i]
        usiro = S[i:N]

        #print(sita,usiro)
        sita = list(set(sita))
        usiro = list(set(usiro))

        #print(sita,usiro)
        for x in range(len(sita)):
            if sita[x] in usiro:
                sum += 1

        count.append(sum)

print(max(count))

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

count = []

for i in range(1,N-1):
    sum = 0
    sita = S[0:i]
    usiro = S[i:N]

    #print(sita,usiro)
    sita = list(set(sita))
    usiro = list(set(usiro))

    #print(sita,usiro)
    for x in range(len(sita)):
        if sita[x] in usiro:
            sum += 1

    count.append(sum)

print(max(count))
Problem p03385 (python)

Fixed submission:
import sys
S = input()
abc = list("abc")

for i in range(len(abc)):
    if abc[i] in S:
        continue
    else :
        print("No")
        sys.exit(0)

print("Yes")

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

if B-A+1 <= K * 2:
    for i in range(A,B+1):
            print(i)
    else:
        sys.exit(0)


for i in range(A,A+K): #AからB
    print(i)

for i in range(B-K+1,B+1):
    print(i)

Buggy submission (verdict: Runtime Error):
import sys
A,B,K = map(int,input().split())
sum = []
if B-A +1 <= K * 2
    for i in range(A,B+1):
        if i > A+K or B-K < i:
            print(i)
    else:
        sys.exit(0)


for i in range(A,A+K): #AからB
    sum.append(i)

for i in range(B-K-1,B+1):
    sum.append(i)

sum = list(set(sum))
sum.sort()
[print(i) for i in sum]
Problem p03386 (python)

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

if B-A+1 <= K * 2:
    for i in range(A,B+1):
            print(i)

else:
    for i in range(A,A+K): #AからB
        print(i)

    for i in range(B-K+1,B+1):
        print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input().split())
for i in range(A,B+1): #AからB
    if i < A+K || B-K < i :
        print(i)
Problem p03474 (python)

Fixed submission:
import re
A,B = list(map(int,input().split()))
S = input()

d = re.compile("\d+")

if (d.match(S[:A])) and S[A] == "-" and d.match(S[A+1:]):
    print("Yes")

else:print("No")

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

b = list(S.split("-"))

a.sort()
b.sort()

if a[0] == len(b[0]) and a[1] == len(b[1]):
    print("Yes")
elif sum(a) == len(b[1]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import re
import sys
A,B = map(int,input().split())
S = input()


if S.count("-") == 1:
    s1,s2 = S.split("-")
    result = re.match(f"^[0-9]", s1)

    for x in range(2):
        if x == 1:
            result = re.match(f"^[0-9]", s2)
        if result:
            continue
        else:
            print("No")
            sys.exit(0)

    judgment = s1
    n = A
    for x in range(2):
        if x == 1:
            judgment = s2
            n = B
        if len(judgment) == n:
            continue
        else:
            print("No")
            sys.exit(0)

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

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


if S.count("-") == 1:
    s1,s2 = S.split("-")
    result = re.match(f"^[0-9]", s1)

    for x in range(2):
        if x == 1:
            result = re.match(f"^[0-9]", s2)
        if result:
            continue
        else:
            print("No")
            sys.exit(0)

    judgment = s1
    n = A
    for x in range(2):
        if x == 1:
            judgment = s2
            n = B
        if len(judgment) == n:
            continue
        else:
            print("No")
            sys.exit(0)

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

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

if S.count("-") == 1:
    s1,s2 = S.split("-")
    if len(s1) == A:
        if len(s2) == B:
            print("Yes")
        else:
            print("No")
            sys.exit(0)
    elif len(s2) == A:
        if len(s1) == B:
            print("Yes")
        else:
            print("No")
            sys.exit(0)
    else:
        print("No")
        sys.exit(0)
else:
    print("No")

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

if S.count("-") == 1:
    s1,s2 = S.split("-")
    if len(s1) == A:
        if len(s2) == B:
            print("Yes")
        else:
            print("No")
    elif len(s2) == A:
        if len(s1) == B:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
        sys.exit(0)
else:
    print("No")

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

if S.count("-") == 1:
    s1,s2 = S.split("-")
    if len(s1) == A:
        if len(s2) == B:
            print("Yes")
    elif len(s1) == A:
        if len(s2) == B:
            print("Yes")
    else:
        print("No")
        sys.exit(0)
else:
    print("No")
Problem p03854 (python)

Fixed submission:
import re
print("YES" if re.match("^(dream|dreamer|erase|eraser)+$",input()) else "NO")

Buggy submission (verdict: Runtime Error):
moji = ["dream", "dreamer", "erase", "eraser"]

for i in range(len(moji)):
  moji[i] = moji[i][::-1]

s = input()[::-1]

for i in range(0, 3):
  tmp = s.replace(moji[i], "")
  if tmp != s:
    for j in range(1, 3):
      ans = tmp.replace(moji[j], "")
      if ans != tmp:
        flg = "YES"

if flg == "YES":
  print("YES")
else:
  print("NO")
Problem p03145 (python)

Fixed submission:
ab, bc, ca = map(int, input().split())

print(int(ab*bc/2))

Buggy submission (verdict: Runtime Error):
|AB| * |BC| / 2
Problem p04043 (python)

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

Buggy submission (verdict: Runtime Error):
print(sorted([int(input()) for i in range(3)]) == [5,5,7])
Problem p04001 (python)

Fixed submission:
s = input()
n = len(s)

ans = 0

for bit in range(1 << (n - 1)):
    f = s[0]

    for i in range(n - 1):
        # ここのif文の判定基準が理解できていません。
        if bit & (1 << i):
            f += "+"
        f += s[i + 1]

    ans += sum(map(int, f.split("+")))

print(ans)

Buggy submission (verdict: Runtime Error):
    total = 0
Problem p02705 (python)

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

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

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = 0
for P in map(int, input().split()):
    if P <= N:
        N = x
        M += 1
print(M)
Problem p02818 (python)

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

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

Fixed submission:
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

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

Buggy submission (verdict: Runtime Error):
w = input()
m = Map()
for t in w:
    m[t] = m.get(t, 0) + 1

for c, cnt in m:
    if cnt % 2 == 1:
        print("No")
        exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True
h = Map()

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

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

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True
h = Map()

for i in w:
    h[i] = h.get(i, 0) + 1

for key in h:
    ok = ok and (h[key] % 2 == 0)
if ok:
    print("Yes")
else:
    print("No")
Problem p03035 (python)

Fixed submission:
a,b = map(int, input().split())
if(a >= 13):
  print(b)
elif(a >= 6):
  print(int(b/2))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
cards = list(map(int, input().split()))
 
def calc():
  for i in range(m):
    b,c = map(int, input().split())
    if(min(cards) > c or b == 0):
      continue
    for i in range(b):
      if(b == 0):
        break
      card_min = min(cards)
      if(c > card_min and b > 0):
        cards.remove(card_min)
        cards.append(c)
        b -= 1
  return sum(cards)
 
print(calc())
Problem p03162 (python)

Fixed submission:
num = int(input())
actions = []
for i in range(num):
    actions.append(list(map(int, input().split())))

dp = [[0 for i in range(3)] for j in range(num)]
for i in range(num):
    if i == 0:
        dp[i][0] = actions[i][0]
        dp[i][1] = actions[i][1]
        dp[i][2] = actions[i][2]
    else:
        dp[i][0] = max(dp[i-1][1] + actions[i][0], dp[i-1][2] + actions[i][0])
        dp[i][1] = max(dp[i-1][0] + actions[i][1], dp[i-1][2] + actions[i][1])
        dp[i][2] = max(dp[i-1][0] + actions[i][2], dp[i-1][1] + actions[i][2])

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))

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

dp = [[0 if j != 0 else actions[i][j] for i in range(3)] for j in range(num)]
for i in range(num) if i != 0:
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + actions[i][0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + actions[i][1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + actions[i][2]

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))

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

dp = [[0 if j != 0 else actions[i][j] for i in range(3)] for j in range(num)]
for i in range(num):
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + actions[i][0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + actions[i][1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + actions[i][2]

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))
Problem p03163 (python)

Fixed submission:
def calc(num,capacity):
    dp = [0]*(capacity+1)
    for _ in range(num):
        weight, value = map(int, input().split())
        for w in range(capacity,weight - 1,-1):
            tmp = dp[w - weight] + value
            if dp[w] < tmp:
              dp[w] = tmp
    return dp[capacity]

num, capacity = map(int, input().split())
print(calc(num,capacity))

Buggy submission (verdict: Runtime Error):
num, capacity = map(int, input().split())
dp = [0]*(capacity+1)

for i in range(1, num + 1):
    weight, value = map(int, input().split())
    for w in range(capacity,weight - 1,-1):
        if w < weight:
            continue
        else:
            dp[w] = max( dp[w - weight] + value,  dp[w] )
print(dp[num][capacity])

Buggy submission (verdict: Runtime Error):
num, capacity = map(int, input().split())
dp = [0]*(capacity+1)

for i in range(1, num + 1):
    weight, value = map(int, input().split())
    for w in range(capacity,w-1,-1):
        if w < weight:
            continue
        else:
            dp[w] = max( dp[w - weight] + value,  dp[w] )
print(dp[num][capacity])

Buggy submission (verdict: Runtime Error):
num, capacity = list(map(int, input().split()))
dp = [[0 for i in range(capacity + 1)] for j in range(num + 1)]

for i in range(1, num + 1):
    weight, value = list(map(int, input().split())
    for w in range(capacity + 1):
        if w - weight >= 0:
            dp[i][w] = max( dp[i-1][w - weight] + value,  dp[i-1][w] )
        else:
            dp[i][w] = dp[i-1][w]
print(max( dp[num] ))
Problem p03206 (python)

Fixed submission:
d = int(input())
print('Christmas' if d==25 else ('Christmas Eve' if d==24 else ( 'Christmas Eve Eve' if d == 23 else ( 'Christmas Eve Eve Eve' if d == 22 else ''  ) ) ))

Buggy submission (verdict: Runtime Error):
d = int(input())
print('Christmas' if d==25 else ('Christmas Eve' if d==24 else ( 'Christmas Eve Eve' if d == 23 else ( 'Christmas Eve Eve Eve' if d == 22 else  ) ) ))
Problem p03238 (python)

Fixed submission:
import sys
n = int(input())
if n == 1:
	print('Hello World')
	sys.exit()
print(sum([int(input()) for _ in range(2)]))

Buggy submission (verdict: Runtime Error):
import sys
n = int(input())
if n == 1:
	print('Hello World)
	sys.exit()
print(sum([int(input()) for _ in range(2)]))

Buggy submission (verdict: Runtime Error):
n = int(input())
num = [int(input()) for _ in range(2)]
print('Hello World' if n == 1 else sum(num))
Problem p03456 (python)

Fixed submission:
import sys
a,b = input().split()
num = int(a+b)
i=1
while(i<=num**0.5):
	if(i**2 == num):
		print('Yes')
		sys.exit()
	i += 1
print('No')

Buggy submission (verdict: Runtime Error):
a,b = input().split
num = int(a+b)
print('Yes' if float(num**0.5) else 'No')

Buggy submission (verdict: Runtime Error):
import math
a,b = input().split
num = int(a+b)
print('Yes' if is_integer(math.sqrt(num)) else 'No')
Problem p03469 (python)

Fixed submission:
s = input()
print(s[:3]+'8'+s[4:])

Buggy submission (verdict: Runtime Error):
s = input()
s[3] = '7'
print(s)
Problem p03470 (python)

Fixed submission:
n = int(input())
l = []
for _ in range(n):
	l.append(int(input()))
print(len(list(set(l))))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for _ in range(n):
	l.append(int(input()))
list(set(l.sorted()))
print(len(l))
Problem p03474 (python)

Fixed submission:
import sys
a, b = map(int, input().split())
s = input()
if(s.count('-') == 1 and s[a] == '-'):
	print('Yes')
	sys.exit()
print('No')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
if(len(s) != a+b+1 or s[a] != '-'):
	print('No')
	sys.exit()
print('Yes')
Problem p04012 (python)

Fixed submission:
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 1
for i in ans.values():
  if i%2!=0:
    print('No')
    sys.exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 0
for i in ans:
  if i%2 !=0:
    print('No')
    sys.exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys
s = input()
ans = ['a':0,'b':0,'c':0]
for i in s:
	if i in ans:
		ans[i] +=1
    else:
		print('NO')
        sys.exit()
print('YES' if (ans['a']%2==0 and ans['a']%2==0 and ans['a']%2==0) else 'NO')
Problem p04043 (python)

Fixed submission:
s = input().split()
print('YES' if s.count('5')==2 and s.count('7')==1 else 'NO')

Buggy submission (verdict: Runtime Error):
print('YES' if (input().split().count('5')==2 and input().split().count('7')==1) else 'NO')

Buggy submission (verdict: Runtime Error):
print('YES' if input().split().count('5')==2 and input().split().count('7')==1 else 'NO')