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

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

R = s.count('R')
B = len(s)-R

if R > B:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
R = s.count('R')
B = len(s)-R
if R > B:
  print('Yes')
else:
  peint('No')
Problem p03086 (python)

Fixed submission:
S = list(input())
M = 0
count = 0
for x in S:
  if x =="A" or x =="C" or x =="T" or x =="G":
    count += 1
  else:
    count = 0
  if M<count:
    M = count
print(M)

Buggy submission (verdict: Runtime Error):
S = input()
ans = 0
ACGT = 0
for i in len(S):
  if S[i]=='A' or S[i]=='G' or S[i]=='C' or S[i]=='T':
    ACGT += 1
  else:
    ans = max(ans,ACGT)
    ACGT = 0
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
ans = 0
ACGT = 0
for i in len(S):
  if S[i]=='A' or S[i]=='G' or A[i]=='C' or A[i]=='T':
    ACGT += 1
  else:
    ans = max(ans,ACGT)
    ACGT = 0
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
N = len(S)
ans = 0
for i in range(N):
for j in range(i, N):
if all('ACGT'.count(c) == 1 for c in S[i : j + 1]):
print(ans)
ans = max(ans, j - i + 1)
Problem p03087 (python)

Fixed submission:
import numpy as np
N,Q = map(int,input().split())
S = np.array(list('_' + input()), dtype='U2')
A = (S == 'A')
C = (S == 'C')
AC = (A[:-1] & C[1:])
AC_cum = AC.cumsum()

for _ in range(Q):
  L,R = map(int,input().split())
  print(AC_cum[R-1] - AC_cum[L-1])

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
S = input()
for i in range(q):
  l,r = map(int,input().split())
  A = S[l,r+1]
  cnt = A.count('AC')
  print(cnt)
Problem p03109 (python)

Fixed submission:
a = input()
b =a[0]+a[1]+a[2]+a[3]+a[5]+a[6]+a[8]+a[9]
c =int(b)
if c <= 20190430:
  print('Heisei')
else:
  print('TBD')

Buggy submission (verdict: Runtime Error):
a = input()
b =a[0]+a[1]+a[2]+a[3]+a[5]+a[6]+a[8]+a[9]
c =int(a)
if c <= 20190430:
  print('Heisei')
else:
  print('TBD')
Problem p03111 (python)

Fixed submission:
N,A,B,C = map(int,input().split())
l = [int(input()) for i in range(N)]
INF = 100000000
def rec(i,a,b,c):
    if(i==N):
        return(abs(a-A)+abs(b-B)+abs(c-C)-30 if min(a,b,c)>0 else INF)
    ret0 = rec(i+1,a,b,c)
    ret1 = rec(i+1,a+l[i],b,c)+10
    ret2 = rec(i+1,a,b+l[i],c)+10
    ret3 = rec(i+1,a,b,c+l[i])+10
    return min(ret0,ret1,ret2,ret3)
print(rec(0,0,0,0))

Buggy submission (verdict: Runtime Error):
N,A,B,C = map(int,input().split())
l = [int(input()) for _ in range(n)]
INF=10**9

def dfs(cur, a, b, c):
  if cur == N:
    return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
  ret0 = dfs(cur + 1, a, b, c)
  ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
  ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
  ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10
  return min(ret0, ret1, ret2, ret3)

print(dfs(0, 0, 0, 0))

Buggy submission (verdict: Runtime Error):
n,a,b,c = map(int,input().split())
l = [int(input()) for _ in range(n)]
INF=10**9

def dfs(cur, a, b, c):
  if cur == N:
    return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
  ret0 = dfs(cur + 1, a, b, c)
  ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
  ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
  ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10
  return min(ret0, ret1, ret2, ret3)

print(dfs(0, 0, 0, 0))
Problem p03130 (python)

Fixed submission:
L = []
for _ in range(3):
  A,B = map(int,input().split()) 
  L.append(A)
  L.append(B)
L.sort()
M = []
a = L.count(1)
b = L.count(2)
c = L.count(3)
d = L.count(4)
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
L = [map(int,input().split()) for _ in range(3)]
L.sort()
M = []
a = L.count('1')
b = L.count('2')
c = L.count('3')
d = L.count('4')
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')
Problem p03139 (python)

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

Buggy submission (verdict: Runtime Error):
n,a,b = map(int,input(),split())
if a+b - n > 0 :
  print(min(a,b),a+b-n)
else:
  print(min(a,b),0)
Problem p03155 (python)

Fixed submission:
n = int(input())
h = int(input())
w = int(input())
print((n-h+1)*(n-w+1))

Buggy submission (verdict: Runtime Error):
n,h,w = map(int,input().split())
print((n-h+1)*(n-w+1))

Buggy submission (verdict: Runtime Error):
n,h,w = map(int,input(),split())
print((n-h+1)*(n-w+1))
Problem p03206 (python)

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

Buggy submission (verdict: Runtime Error):
 print('Christmas' + ' Eve' * (25 - int(input())))
Problem p03212 (python)

Fixed submission:
N = int(input())

ans = 0
a = [3, 5, 7]
i = 0
while a[i] <= N:
    x10 = a[i] * 10
    a.append(x10+3)
    a.append(x10+5)
    a.append(x10+7)
    i += 1

for j in range(i):
    s = str(a[j])
    if "3" in s and "5" in s and "7" in s:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
def dfs(s): # 文字列 s で始まる七五三数の個数 if int(s) > N:
  return 0
ret = 1 if all(s.count(c) > 0 for c in '753') else 0 # s 自体が七五三数なら +1 for c in '753':
         ret += dfs(s + c)
     return ret
print(dfs('0')) # 本当は dfs('') と書きたいが 4 行目でのエラーを防ぐため仕方なく

Buggy submission (verdict: Runtime Error):
ans = 0
n = int(input())
if n < 357:
  print(0)
else:
  for i in range(n):
    s = str(i)
    if s.count('7')+s.count('5')+s.count('3') == len(s):
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(n+1):
  s = str(i)
  if s.count('7')+s.count('5')+s.count('3') == int(s):
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(n+1):
  s = str(input())
  if s.count('7')+s.count('5')+s.count('3') == int(s):
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(n+1):
  s = list(str(input()))
  if s.count('7')+s.count('5')+s.count('3') == int(s):
    ans += 1
print(ans)
Problem p03220 (python)

Fixed submission:
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
temp = []
for i in range(n):
  temp.append(a-(t-H[i]*0.006))
temp_abs = [abs(j) for j in temp]
mini_temp_abs = min(temp_abs)
for k in range(n):
  if temp_abs[k] == mini_temp_abs:
    print(k+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
temp = []
for i in range(n):
  temp.append(a-(t-H[i]*0.006))
print(min(abs(temp)))
Problem p03238 (python)

Fixed submission:
n = int(input())

if n == 1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)

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

if n == 1:
  print('Hello World')
else:
  print(a+b)

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

if a == 1:
  print('Hello World')
else:
  print(a+b)
Problem p03254 (python)

Fixed submission:
n,x = map(int,input().split())
a = sorted(list(map(int,input().split())))
for i in range(n):
  x = x-a[i]
  if x<0:
    break
if i == n-1 and x == 0:
  i += 1
print(i)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input().split())
A = sorted(map(int,input().split()))
ans = 0
for i in range(n):
  x -= A[i]
  ans += 1
  if x = 0:
    ans -= 1
    break
print(ans)
Problem p03281 (python)

Fixed submission:
n = int(input())
ans=0
for i in range(1,n+1,2):
    a=0
    for j in range(1,i+1,2):
        if i%j==0:
            a+=1
    if a==8:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0
A = [i for i in range(n+1)]
A = A[1::2]
for i in range(len(A)):
    a=0
    for j in range(len(A)):
        if A[i] % j == 0:
            a += 1
    if a == 8:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
A = [i for i in range(n)]
A = A[1::2]
ans = 0
for i in range(len(A)):
  a = 0
  for j in range(len(A)//2):
    if A[i] % j == 0:
      a += 1
      if a == 8:
        ans += 1
      if a == 9:
        ans -= 1
        break
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans=0
for i in range(1,N+1,2):
    a=0
    for j in range(1,i+1,2):
        if i%j==0:
            a+=1
    if a==8:
        ans+=1
print(ans)
Problem p03284 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(ont,input().split())
if a % b == 0:
  print(0)
else:
  print(1)
Problem p03285 (python)

Fixed submission:
x=int(input())
t=0
while x>=0:
  if x%7==0:
    t=1
  x-=4
if t==0:
  print('No')
else: print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = n//4
b = n//7
ans = 0
for i in range(a+1):
    for j in range(b+1):
        if 4*i+7*j == n:
            ans = 1
if ans = 1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range():
  for j in range():
    if 3*(i+1)+7*(j+1) == n:
      print('Yes')
    else:
      print('No')
Problem p03292 (python)

Fixed submission:
l=sorted(map(int,input().split()))
print(l[-1]-l[0])

Buggy submission (verdict: Runtime Error):
L = list[map(int,input().split())]
M = L.sort()
print(L[2]-L[0])
Problem p03303 (python)

Fixed submission:
s=input()
n = int(input())
print(s[::n])

Buggy submission (verdict: Runtime Error):
s = input()
w = int(input())
ans = []
asn.append(s[0])
for i in range(1,w//3+1):
  ans.append(s[w*i+1])
print(ans)
Problem p03316 (python)

Fixed submission:
N = input()
ans = 0
for i in N:
    ans += int(i)
if int(N)%ans == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
sum_a = 0
for i in range(n):
  a = n[i]
  sum_a += a
if n % sum_a == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
  a = n[i]
  sum_a += a
if n % sum_a == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = str(input())
l = []
for i in range(n):
  a = n[i]
  l.append(a)
sum_l = sum(l)
if int(n) % sum_l == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = str(input())
l = []
for i in range():
  a = n[i]
  l.append(a)
sum_l = sum(l)
if int(n) % sum_l == 0:
  print('Yes')
else:
  print('No')
Problem p03325 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
ans = 0

for i in a:
    while True:
        if i % 2 == 0:
            ans += 1
            i //= 2
        else:
            break
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)
S = []
if N >= M:
  print(0)
  exit()

for i in range(M-1):
  S.append(abs(L[i+1]-L[i]))

  S=sorted(S)
print(sum(S[0:M-N]))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)
S = []
if N >= M:
	print(0)
	exit()

for i in range(M-1):
	S.append(abs(L[i+1]-L[i]))
S=sorted(S)
print(sum(S[0:M-N]))
Problem p03328 (python)

Fixed submission:
a,b = map(int,input().split())
n = b-a
tower = ((n+1)*n)/2
print(int(tower-b))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
n =　b-a
print(n*(n+1)/2-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
n =　b-a
print(n*(n+1)//2-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
for i in range (1,1000):
  n = i(i+1)//2
  if b - a == i:
    print(n-a)
Problem p03331 (python)

Fixed submission:
n = int(input())
if n % 10 == 0:
  print(10)
else:
  result = sum(list(map(int, str(n))))
  print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n % 10 == 0:
  print(10)
else:
  a = str(n)
  b = sum(a)
  print(b)
Problem p03352 (python)

Fixed submission:
X = int(input())
se = set(n**e for n in range(32) for e in range(2,11) if n**e <= X)

answer = max(se)
print(answer)

Buggy submission (verdict: Runtime Error):
x = int(input)
for i in range(x**0.5):
  if x <= i**2:
    break
    print((i-1)**2)
Problem p03359 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,ibput().split())
if a >= b:
  print(b)
else:
  print(a)
Problem p03360 (python)

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

Buggy submission (verdict: Runtime Error):
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(l[0]+l[1]+l[2]*(k*2))

Buggy submission (verdict: Runtime Error):
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(int(l[0])+int(l[1])+int(l[2])*k)

Buggy submission (verdict: Runtime Error):
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(l[0]+l[1]+l[2]*k)
Problem p03370 (python)

Fixed submission:
n,x = map(int,input().split())
l = []
for i in range(n):
  l.append(int(input()))
sum_l = sum(l)
mini = min(l)
rest = x - sum_l
count = n + rest//mini
print(count)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input().split())
l = []
for i in range(n):
  l.append(int(input())
sum_l = sum(l)
mini = min(l)
rest = x - sum_l
count = n + rest//mini
print(count)
Problem p03371 (python)

Fixed submission:
A,B,C_AB,X,Y = map(int, input().split())
if A+B >= 2*C_AB:
  print(2*C_AB*(min(X,Y)) + min(A,2*C_AB)*(X-min(X,Y)) + min(B,2*C_AB)*(Y-min(X,Y)))
else:
  print(A*X+ B*Y)

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

ans = 10**18
for c in range(10**5+1):
  a = X-c
  b = Y-c
  cost = C*c*2
  cost += max(a,0)*A
  cost += max(b,0)*B
  ans = min(ans,cost)
print(answer)
Problem p03385 (python)

Fixed submission:
s = str(input())
a = s.count('a')
b = s.count('b')
c = s.count('c')
if a == b == c == 1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s = list(input())
if s[0] != a[1] and s[1] != s[2] and s[2] != s[0]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())
a = s.count(a)
b = s.count(b)
c = s.count(c)
if a == b == c == 1:
  print('Yes')
else:
  print('No')
Problem p03386 (python)

Fixed submission:
a,b,k=map(int,input().split())
l=range(a,b+1)
ans=sorted(set(l[:k])|set(l[-k:]))
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int,input().split())
l =list[a:b]
mimi = l[:a-k]
maxi = l[b-k:]
print(mini+maxi)
Problem p03399 (python)

Fixed submission:
a,b,c,d=[int(input()) for i in range(4)]
print(min(a,b)+min(c,d))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
L = list[a,b,c,d]
M = L.sort()
print(M[0]+M[1])
Problem p03400 (python)

Fixed submission:
n = int(input())
m, k = [int(_) for _ in input().split()]
    
for i in range(n):
    for j in range(1, m+1, int(input())):
        k += 1
print(k)

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

a = []
for i in range(n):
  a.append(int(input()))

count = 0
for i in range(1,d+1):
  for j in a:
    if (i-1)%a == 0:
      count += 1

print(count + n)

Buggy submission (verdict: Runtime Error):
n = int(input())
d,x = map(int,input().split())
count += x
a = []
for i in range(n):
  b = int(input())
  a.append(b)
  for j in range(n):
    if 1 + a[i]*j <= n:
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
d,x = map(int,input(),split())
count += x
a = []
for i in range(n):
  b = int(input())
  a.append(b)
  for j in range(n):
    if 1 + a[i]*j <= n:
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
d,x = map(int,input(),split())
count += x
a = []
for i in range(n):
  a.append(int(input()))
  for j in range(n):
    if 1 + a[i]*j <= n:
      count += 1
print(count)
Problem p03407 (python)

Fixed submission:
a,b,c = map(int,input().split())
if a+b >= c:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input(),split())
if a+b >= c:
  print('Yes')
else:
  print('No')
Problem p03424 (python)

Fixed submission:
n = int(input())
s = map(str,input().split())
if 'Y' in s:
  print('Four')
else:
  print('Three')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(str,input().split()))
if s in 'Y':
  print('Four')
else:
  print('Three')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = map(str,input().split())
if s in 'Y':
  print('Four')
else:
  print('Three')
Problem p03427 (python)

Fixed submission:
N = list(map(str, input().rstrip()))
print(max(sum([int(i) for i in N]), 9*(len(N)-1)+int(N[0])-1))

Buggy submission (verdict: Runtime Error):
n = input()
n = list(n)
#5行目のエラーを防ぐためにstrからlistに変換
if n[-2] != '9' and n[-1] != '9':
  n[-2] = '9'
  n[-1] = str(int(n[-1])+1)

N = [int(i) for i in n]
#listをstrからintに変換
print(sum(N))

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

if n[-2] != '9' and n[-1] != '9':
  n[-2] = '9'
  n[-1] = str(int(n[-1])+1)

print(sum(n))
Problem p03433 (python)

Fixed submission:
n=int(input())%500
a=int(input())
print('Yes' if a>=n else 'No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = int(input())
m = n % 500
if a >=　m :
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n=int(input())%500
a=int(input())
if a>=n:
  print('Yes')
else:
  ptint('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = int(input())
if a >=　(n % 500):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())
n = int(input())
if a >=　(n % 500):
  print('Yes')
else:
  print('No')
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
b = sorted(a, reverse=True) 
Alice = 0
Bob = 0

for i in range(N):
  if i % 2 == 0:
    Alice += b[i]
  else:
    Bob += b[i]
    
print(Alice - Bob)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int,input().split()))
S = s.sort(reverse=True)

A = S[0:n+1:2]
B = S[1:n+1:2]

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int,input().split()))
S = s.sort(reverse=True)
A = S[0:n+1:2]
B = S[1:n+1:2]
sum_A = sum(A)
sum_B = sum(B)
print(sum_A - sum_B)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int,input().split()))
S = s.sort(reverse=True)
A = S[0:n+1:2]
B = S[1:n+1:2]
sum_A = sum(A)
sum_B = sum(B)
print(sum_A - sum_B)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int,input().split()))
S = s.sort()
S_re = S.reverse()
A = S_re[0:n+1:2]
B = S_re[1:n+1:2]
sum_A = sum(A)
sum_B = sum(B)
print(sum_A - sum_B)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int,input().split()))
S = s.sort(Reverse=True)
A = S[0:n+1:2]
B = S[1:n+1:2]
sum_A = sum(A)
sum_B = sum(B)
print(sum_A - sum_B)
Problem p03448 (python)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,input().split())
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*a + 100*b + 50*c == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x = int(input().split())
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*a + 100*b + 50*c == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,input().split())
count = 0

for a in range(a+1):
    for b in range(b+1):
        for c in range(c+1):
            if (500*a + 100*b + 50*c) == x:
                count += 1

print(count)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,input().split())
count = 0

for a in range(a+1):
    for b in range(b+1):
        for c in range(c+1):
            if (500*a + 100*b + 50*c) == x:
                count += 1

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
count = 0

for a in range(a+1):
    for b in range(b+1):
        for c in range(c+1):
            if (500*a + 100*b + 50*c) == x:
            count += 1

print(count)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,input().split())
count = 0

for a in range(a+1):
    for b in range(b+1):
        for c in range(c+1):
            count += 1

print(count)
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,b = map(int,input(),split())
if a*b%2==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a * b) % 2 = 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a * b) % 2:
  print(Even)
else:
  print(Odd)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a * b) % 2 = 0:
  print(Even)
else:
  print(Odd)

Buggy submission (verdict: Runtime Error):
a,b = map(int,imput().split())
if (a * b) % 2 = 0:
  print(Even)
else:
  print(Odd)
Problem p03456 (python)

Fixed submission:
a,b = map(str,input().split())
s = a+b
l = []
for i in range(320):
  l.append(i*i)

if int(s) in l:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b = map(ste,input().split())
s = a+b
l = []
for i in range(320):
  l.append(i*i)

if int(s) in l:
  print('Yes')
else:
  print('No')
Problem p03469 (python)

Fixed submission:
s = input()
s = s.replace('2017','2018')
print(s)

Buggy submission (verdict: Runtime Error):
s = input()
s[3]=8
print(s)

Buggy submission (verdict: Runtime Error):
a = input()
a[3]='8'
print(a)
Problem p03471 (python)

Fixed submission:
n, y = map(int, input().split())
for i in range(n + 1):
    for j in range(n - i + 1):
        if i * 10000 + j * 5000 + (n - i - j) * 1000 == y:
            print(i, j, n - i - j)
            exit()
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
n,y = map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if y == 10000*i+5000*j+1000*(n-i-j) :
      print(i,l,n-i-j)
      exit()
      
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
import sys
n,y = map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if y == 10000*i+5000*j+1000(n-i-j) :
      print(i,l,n-i-j)
      sys.exit()
      
print(-1,-1,-1)