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

Fixed submission:
s = input()
c = 0
if(s[0] == "1"):
    c += 1


if(s[1] == "1"):
    c += 1


if(s[2] == "1"):
    c += 1

print(c)

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

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

count = 0

while(True):
    odd = False
    for i in range(n):
        if((a[i] % 2) != 0):
            odd = True
    if(odd):
        break
    for i in range(n):
        a[i] /= 2 
    count += 1


print(count)

Buggy submission (verdict: Runtime Error):
s = input()
c = 0
if(s[0] == "1"):
    c++


if(s[1] == "1"):
    c++


if(s[2] == "1"):
    c++
Problem p03494 (python)

Fixed submission:
n = int(input())

a = list(map(int, input().split()))
     #a = [].append(input())
count = 0

while(True):
    odd = False
    for i in range(0,n):
        if a[i]%2==1:
            odd = True
    if(odd):
        break
    for i in range(0,n):
        a[i] /= 2 
    count += 1


print(count)

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

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

count = 0

while(True):
    odd = False
    for i in range(n):
        if((a[i] % 2) != 0):
            odd = True
    if(odd):
        break
    for i in range(n):
        a[i] /= 2 
    count += 1


print(count)

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

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

count = 0

while(True):
    odd = False
    for i in range(n):
        if((a[i] % 2) != 0):
            odd = True
    if(odd):
        break
    for i in range(n):
        a[i] /= 2 
        count += 1
print(count)
Problem p03455 (python)

Fixed submission:
i = input()
sp = i.split()

multid = int(sp[0]) * int(sp[1])

if multid % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
i = input()
sp = i.spint()

multid = sp[0] * sp[1]

if multid % 2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03434 (python)

Fixed submission:
d = '2 7 4'
d = input()
d = input()
d = [int(i) for i in d.split()]
d.sort()
s1 = 0
s2 = 0
i = len(d)-1
while(i>=0):
    s1 = s1 + d[i]
    if((i-1)>=0):
        s2 = s2 + d[i-1]
    i = i-2
print(s1-s2)

Buggy submission (verdict: Runtime Error):
d = '2 7 4'
 d = input()
d = [int(i) for i in d.split()]
d.sort()
s1 = 0
s2 = 0
i = len(d)-1
while(i>=0):
    s1 = s1 + d[i]
    if((i-1)>=0):
        s2 = s2 + d[i-1]
    i = i-2
print(s1-s2)
Problem p03448 (python)

Fixed submission:
a = input()
b = input()
c = input()
x = input()

a = int(a)
b = int(b)
c = int(c)
x = int(x)

# a = 2
# b = 2
# c = 2
# x = 100

cnt = 0
for i1 in range(0,a+1):
    for i2 in range(0,b+1):
        for i3 in range(0,c+1):
            s = 500*i1+100*i2+50*i3
            if(s==x):
                cnt = cnt + 1
print(cnt)

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

# a = 2
# b = 2
# c = 2
# x = 100

cnt = 0
for i1 in range(0,a+1):
    for i2 in range(0,b+1):
        for i3 in range(0,c+1):
            s = 500*i1+100*i2+50*i3
            if(s==x):
                cnt = cnt + 1
print(cnt)
Problem p03455 (python)

Fixed submission:
a = input()
d = a.split()
b = int(d[0])*int(d[1])
if(b%2==0):
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = input()
d = a.split()
b = d[0]*d[1]
if(b%2==0):
    print('Even')
else:
    print('Odd')
Problem p03478 (python)

Fixed submission:
n = 20
a = 2
b = 5

i = input()
d = i.split()
n = int(d[0])
a = int(d[1])
b = int(d[2])

sum1 = 0

for i in range(1,n+1):
    d = list(str(i))
    sum2 = 0
    for i2 in d:
        sum2 = sum2 + int(i2)
    if(a<=sum2 and sum2<=b):
        sum1 = sum1 + int(i)

print(sum1)

Buggy submission (verdict: Runtime Error):
n = 20
a = 2
b = 5

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

sum1 = 0

for i in range(1,n+1):
    d = list(str(i))
    sum2 = 0
    for i2 in d:
        sum2 = sum2 + int(i2)
    if(a<=sum2 and sum2<=b):
        sum1 = sum1 + int(i)

print(sum1)
Problem p03493 (python)

Fixed submission:
input = str(input())
num = 0

for i in input:
  if i == "1":
    num += 1
    
print(num)

Buggy submission (verdict: Runtime Error):
input = input()
num = 0

for i in range(2):
  if (input[i] == 1):
    num++

print(i)

Buggy submission (verdict: Runtime Error):
input = input()
num = 0

for i in range(3):
  if (input[i] == 1):
    num++

print(i)
Problem p03494 (python)

Fixed submission:
input_num = input()
input = input().split()

times = 0
i = 0
    
while True:
  if int(input[i]) % 2 == 0:
    input[i] = int(input[i]) / 2
    i += 1
    if i == int(input_num) - 1:
      i = 0
      times += 1
  else:
    break
print(times)

Buggy submission (verdict: Runtime Error):
input_num = input()
input = input().split()

times = 0
i = 0

while True:
  if int(input[i]) % 2 == 0:
    i += 1
    if i == input_num:
      i = 0
      times += 1
  else:
    break

print(times)

Buggy submission (verdict: Runtime Error):
input_num = input()
input = input().split()

times = 0
i = 0

while true:
  if input % 2 == 0:
    i += 1
    if i % input_num == 0:
      times += 1
  else:
    break

print(times)
Problem p03457 (python)

Fixed submission:
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y > t or (x + y + t) % 2 == 1:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
t1,x1,y1 = map(int, input().split())

for p in [x1,y1]:
    if p < 0 or n < p:
        print('No')
        exit()

t2,x2,y2 = map(int, input().split())

for p in [x2,y2]:
    if p < 0 or n < p:
        print('No')
        exit()

dt = t2 - t1
d  = abs(x2 - x1) + abs(y2 - y1)

if (d < dt) and (dt%2 == d%2):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
t1,x1,y1 = map(int, input().split())
t2,x2,y2 = map(int, input().split())

dt = t2 - t1
d  = abs(x2 - x1) + abs(y2 - y1)

if (d < dt) and (dt%2 == d%2):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
t1,x1,y1 = map(int, input().split())
t2,x2,y2 = map(int, input().split())


for p in [x1,y1,x2,y2]:
    if p < 0 or n < p:
        print('No')
        exit()

dt = t2 - t1
d  = abs(x2 - x1) + abs(y2 - y1)

if (d < dt) and (dt%2 == d%2):
    print('Yes')
else:
    print('No')
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

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

print(count)

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

count = 0
for i in range(a+1):
 if 500*i>x: break
 for j in range(b+1):
  if x-500*i-100*j > 50*c: break
   count += 1

print(count)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b%2 == 0:
 print("Even")
else:
 print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(string, input().split())
ab = int(a+b)
if ab**0.5 - int(ab**0.5) == 0:
 print("Yes")
else:
 print("No")
Problem p03456 (python)

Fixed submission:
a, b = map(str, input().split())
ab = int(a+b)
if ab**0.5 - int(ab**0.5) == 0:
 print("Yes")
else:
 print("No")

Buggy submission (verdict: Runtime Error):
a, b = map(string, input().split())
ab = int(a+b)
if ab**0.5 - int(ab**0.5) == 0:
 print("Yes")
else:
 print("No")
Problem p03493 (python)

Fixed submission:
s = list(input())
print(int(s[0])+int(s[1])+int(s[2]))

Buggy submission (verdict: Runtime Error):
s = int(list(input()))
print(sum(s))
Problem p03494 (python)

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

end = 0
count = 0

while(True):
 for i in range(n):
  if a[i]%2 == 1:
   end = 1
   break
  a[i] = a[i]/2
 
 if end == 1: break
 count += 1

print(count)

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

end = 0
count = 0
while:
 for i in range(n):
  if a[i]%2 == 1:
   end = 1
   break
  a[i] = a[i]/2
 
 if end == 1: break
 count += 1

print(count)
Problem p03860 (python)

Fixed submission:
s=raw_input().split(' ')
print 'A'+s[1][0]+'C'

Buggy submission (verdict: Runtime Error):
s=raw_input().sprit(' ')
print 'A'+s[1][0]+'C'
Problem p03437 (python)

Fixed submission:
x, y =  map(int, input().split())
i = 1
if x % y == 0:
    print(-1)
else:
    for i in range(10 ** 18 + 1):
        if (i * x) % y != 0:
            print(i * x)
            break
        else:
            continue

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

sumA = 0
sumB = 0

for i in range(n):
    sumA = A[i] + sumA
    sumB = B[i] + sumB

if sumA <= sumB:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

x, y =  map(int, input().split())
i = 1
if x % y == 0;
    print(-1)
else:
    for i in range(10 ** 18 + 1):
        if (i * x) % y != 0:
            print(i * x)
            break
        else:
            continue

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

if x % y == 0;
    print(-1)
else:
    for i = 1 in range(10 ** 18 + 1):
        if i * x % y != 0:
            print(i * x)
            break
        else:
            continue

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

if x < y:
    print(x)
else:
    print(x * (y-1) )

Buggy submission (verdict: Runtime Error):
x, y =  map(int, raw_input().split())
z = 0
i = 1
a = 0

while z < 10 ** 18 or a ==  0:
    z = x * i
    i = i + 1
    if z mod y != 0:
        a = 1
print (z)

Buggy submission (verdict: Runtime Error):

x, y =  map(int ,int)
z = 0
i = 1
a = 0

while z < 10 ** 18 or a =  0:
    z = x * i
    i = i + 1
    if z mod y != 0:
        a = 1
Problem p03438 (python)

Fixed submission:

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sumA = 0
sumB = 0
sumAB = 0

for i in range(n):
    sumA += A[i]
    sumB += B[i]

for i in range(n):
    if A[i] < B[i]:
        sumAB += int((B[i] - A[i]) / 2 + 0.5)

if sumAB <= sumB - sumA:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sumA = 0
sumB = 0
sumAB = 0

for i in range(n):
    sumA += A[i]
    sumB += B[i]

for i in range(n):
    if A[i] < B[i]:
        sumAB += int((b[i] - a[i]) / 2 + 0.5)

if sumAB <= sumB - sumA:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

for i in range(n):
    sumA = A[i] + sumA
    sumB = B[i] + sumB

if sumA < sumB:
    print("Yes")
else:
    print("No")

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

for i in range(n):
    sumA = A[i] + sumA
    sumB = B[i] + sumB

if sumA < sumB:
    print("Yes")
else:
    print("No")

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

for i in range(n):
    sumA = A[i] + sumA
    sumB = B[i] + sumB

if sumA < sumB:
    print("Yes")
else:
    print("No")
Problem p03813 (python)

Fixed submission:
a = int(input())
 
if a >= 1200:
    print("ARC");
else:
    print("ABC");

Buggy submission (verdict: Runtime Error):
a = int(input())
 if a >= 1200:
    print("ARC");
else:
    print("ABC");

Buggy submission (verdict: Runtime Error):
a = int(input())
 if a >= 1200:
    print("ARC");
else:
    print("ABC");
Problem p03547 (python)

Fixed submission:
X,Y = input().split(' ')
if int(X,16) < int(Y,16):
    print("<")
elif int(X,16) > int(Y,16):
    print(">")
else:
    print("=")

Buggy submission (verdict: Runtime Error):
X,Y = input().spilit(' ')
if int(X,16) < int(Y,16):
    print("<")
elif int(X,16) > int(Y,16):
    print(">")
else:
    print("=")
Problem p03567 (python)

Fixed submission:
answer = "AC" in input()
if answer == False:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
if "AC" in input() == True:
    print("Yes")
else:
    print("No")if "AC" in input() == True:
Problem p03675 (python)

Fixed submission:
N = int(input())
a = input().split()
b = [""] * N
b1 = [a[i] for i in range(len(a)) if i % 2 == 1][::-1]
b2 = [a[i] for i in range(len(a)) if i % 2 == 0]
b = b1 + b2
if N % 2 == 1:
	b = b[::-1]
line = " ".join(b)
print(line)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = input().split()
b = []
for i in range(len(a)):
	if i % 2 == 1:
		b.insert(0, a[i])
	else:
		b.append(a[i])
if N % 2 == 1:
	b = b.reverse()
print(b)
line = " ".join(b)
print(line)
Problem p03459 (python)

Fixed submission:
import sys
N = int(input())
t = [0]
x = [0]
y = [0]
for i in range(N):
    tmp_t, tmp_x, tmp_y = map(int, input().split())
    t.append(tmp_t)
    x.append(tmp_x)
    y.append(tmp_y)

    
def go(t, d):
    if t == d:
        return True
    elif t > d:
        if (t - d) % 2 == 0:
            return True
        else:
            return False
    else:
        return False
        


for i in range(N):
    delta_t = t[i+1] - t[i]
    distance = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i])
    if go(delta_t, distance):
        continue
    else:
        print('No')
        sys.exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
xyc = []
for i in range(N):
    tmp_x, tmp_y, tmp_c = input().split()
    xyc.append([int(tmp_x), int(tmp_y), tmp_c])

def check(sx, sy, K, x, y):
    x = x % (2*K)
    y = y % (2*K)
    if x < sx or x >= sx + K:
        if y < sy:
            return 'W'
        elif y < sy + K:
            return 'B'
        else:
            return 'W'
    #elif x >= sx and x < sx + K:
    else:
        if y < sy:
            return 'B'
        elif y < sy + K:
            return 'W'
        else:
            return 'B'


ans = 0
for sx in range(K+1):
    for sy in range(K+1):
        r = 0
        for i in range(N):
            if check(sx, sy, K, xyc[i][0], xyc[i][1]) == xyc[i][2]:
                r = r + 1
        ans = max(ans, r)
print(ans)
Problem p03565 (python)

Fixed submission:
import sys
s = input()
t = input()
l = len(t)
if t in s:
    print(s.replace('?', 'a'))
    sys.exit()
m = -1
for i in range(len(s) - l + 1):
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))

Buggy submission (verdict: Runtime Error):
import sys
s = input()
t = input()
l = len(t)
if t in s:
    print(s.replace('?', 'a'))
    sys.exit()
for i in range(len(s) - l + 1):
    m = -1
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
l = len(t)
for i in range(len(s) - l + 1):
    m = -1
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))
Problem p03608 (python)

Fixed submission:
from itertools import permutations
N, M, R = map(int, input().split())
r = [int(i) - 1 for i in input().split()]
d = [[10000000 for i in range(N)] for j in range(N)]
for i in range(M):
    A, B, C = map(int, input().split())
    d[A-1][B-1] = min(d[A-1][B-1], C)
    d[B-1][A-1] = min(d[A-1][B-1], C)
for k in range(N):
    for s in range(N):
        for e in range(N):
            d[s][e] = min(d[s][e], d[s][k] + d[k][e])
l = True
for o in permutations(r):
    tmp_l = 0
    for s, e in zip(o[:-1], o[1:]):
        tmp_l = tmp_l + d[s][e]
    if l is True:
        l = tmp_l
    else:
        l = min(l, tmp_l)
print(l)

Buggy submission (verdict: Runtime Error):
from itertools import permutations
import sys

N, M, R = map(int, sys.stdin.readline().split())
r = [int(i) - 1 for i in sys.stdin.readline().split()]
d = [[float('inf')] * N for j in range(N)]
for i in range(M):
    A, B, C = map(int, sys.stdin.readline().split())
    d[A-1][B-1] = min(d[A-1][B-1], C)
    d[B-1][A-1] = min(d[B-1][A-1], C)
for k in range(N):
    for s in range(N):
        for e in range(N):
            d[s][e] = min(d[s][e], d[s][k] + d[k][e])
l = float('inf')
for o in permutations(r):
    tmp_l = 0
    for i in range(len(o[:-1]))
        tmp_l = tmp_l + d[i][i+1]
    l = min(l, tmp_l)
print(l)
Problem p03645 (python)

Fixed submission:
import sys
N, M = map(int, input().split())
m = set()
m2 = set()
for i in range(M):
    a, b = map(int, input().split())
    if a == 1:
        m.add(b)
    if b == N:
        m2.add(a)
for me in m:
    if me in m2:
        print('POSSIBLE')
        sys.exit()
print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
    import sys
    N, M = map(int, input().split())
    routes = []
    for i in range(M):
        a, b = map(int, input().split())
        routes.append([a, b])
    m = []
    for r in routes:
        if r[0] == 1:
            m.append(r[1])
    for r in routes:
        if r[0] in m:
            if r[1] == N:
                print('POSSIBLE')
                sys.exit()
    print('IMPOSSIBLE')
Problem p03477 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split(' '))

if A+B > C+D:
    print('Left')
elif A+B is C+D:
    print('Balanced')
else:
    print('Right')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math,sys

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

print(math.ceil((math.log(Y,10)-math.log(X,10))/math.log(2,10)))
Problem p03759 (python)

Fixed submission:
import sys

x = sys.stdin.readline().strip().split(" ")

if int(x[1])-int(x[0]) == int(x[2])-int(x[1]):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if b-a is c-b:
    print("Yes")
else:
    print("No")
Problem p03760 (python)

Fixed submission:
import sys

x = sys.stdin.readline().strip()
y = sys.stdin.readline().strip()

result = ""
n = len(y)
for i in range(0,n):
	result = result + x[i] + y[i]

if len(x)>n:
	result = result + x[-1]

print(result)

Buggy submission (verdict: Runtime Error):
import sys

input = [sys.argv[1],sys.argv[2]]

result = ""
n = len(input[1])
for i in range(0,n):
	result = result + input[0][i] + input[1][i]

if len(input[0])>n:
	result = result + input[0][-1]

print(result)

Buggy submission (verdict: Runtime Error):
import sys

input = sys.argv[1].strip().split("\n")
result = ""
n = len(input[1])
for i in range(0,n):
	result = result + input[0][i] + input[1][i]

if len(input[0])>n:
	result = result + input[0][-1]

print(result)
Problem p03591 (python)

Fixed submission:
def func() :
    s=input()
    if len(s) >= len('YAKI') :
        if s[:4] == 'YAKI' :
            print('Yes')
            return
    print('No')
func()

Buggy submission (verdict: Runtime Error):
def func() :
    n,m=map(int,input().split())
    a={}
    for i in range(n) :
        s = input()
        for c in list(s):
            if c in a:
                a[c]+=1
            else :
                a[c] = 1
    c1=n*m%2
    d1=sum(filter(lambda x : x%2 , a.values()))
    if c1 < d1:
        print('No')
        return
    c4 = (n//2*2)*(m//2*2)
    d4 = sum(filter(lambda x : x//4*4 , a.values()))
    if c4>d4 :
        print('No')
        return
    print('Yes')
func()
Problem p03593 (python)

Fixed submission:
def func() :
    n,m=map(int,input().split())
    a={}
    for i in range(n) :
        s = input()
        for c in list(s):
            if c in a:
                a[c]+=1
            else :
                a[c] = 1
    c1=sum(map(lambda x : x%2 , a.values()))
    c2=sum(map(lambda x : x//4*4, a.values()))
    if c1 != n*m%2 or c2 < (n//2*2)*(m//2*2) :
        print('No')
    else :
        print('Yes')
func()

Buggy submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <string>
#include <map>

using namespace std;

int main() {
	int h,w;
	cin >> h >> w;
	map<char,int> cnt;
	for(int i = 0; i < h; i++) {
		string s;
		cin >> s;
		for(char c : s) cnt[c]++;
	}
	int c1 = 0;
	int c2 = 0;
	for(auto x : cnt) {
		if(x.second % 2) c1 ++;
		c2 += x.second / 4 * 4;
	}
	if(c1 != (h*w)%2 || c2 < (h/2*2)*(w/2*2) ) cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;
}
Problem p03449 (python)

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

l = []

for i in range(N):
    total_li = sum(candies_i[:i+1])
    total_lj = sum(candies_j[i:])
    total = total_li + total_lj
    l.append(total)

print(max(l))

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

l = []
count = 0

for i in range(N):
    count+=1
    total_li = sum(candies_i[:count])
    total_lj = sum(candies_j[+=1:])
    total = total_li + total_lj
    l.append(total)

print(max(l))

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

l = []

for i in range(N):
    total_li = sum(candies_i[:+=1])
    total_lj = sum(candies_j[+=1:])
    total = total_li + total_lj
    l.append(total)

print(max(l))

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

l = []

for i range(N):
    total_li = sum(candies_i[:i])
    total_lj = sum(candies_j[i:])
    total = ( total_li + total_lj )
    l.append(total)

print(max(l))
Problem p03447 (python)

Fixed submission:
#from typing import List


def input_nums():
    # type: () -> List[int]
    return list(map(int, open(0)))


def calc_nums(l):
    # type: (List[int]) -> int
    x, a, b = l
    return (x - a) % b


def main():
    # type () -> None:
    print(calc_nums(input_nums()))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from typing import List


def input_nums() -> List[int]:
    return list(map(int, open(0)))


def calc_nums(l: List[int]) -> int:
    x, a, b = l
    return (x - a) % b


def main() -> None:
    print(calc_nums(input_nums()))


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

Fixed submission:
A,B,C,X=[int(input()) for i in range(4)]
print(sum(500*a+100*b+50*c==X for a in range(A+1) for b in range(B+1) for c in range (C+1)))

Buggy submission (verdict: Runtime Error):
A,B,C,X=[int(input()) for i in range(4)]
print(sum(500*a+100*b+50*c==X for a in range(A+1) for b in range(B+1) for c in range (c+1)))
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
print("Even" if a*b %2==0 else"Odd")

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

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

Buggy submission (verdict: Runtime Error):
S1,S2,S3=map(input().split())
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
S1,S2,S3=map(input().split())
print(count"1")
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):
import math
a, b = input().split()
c = int(a + b)

if (int)math.sqrt(c) - math.sqrt(c) == 0:
    print("Yes")
else:
    print("No")
Problem p03456 (python)

Fixed submission:
import math
a, b = input().split()
c = int(a + b)

if int(math.sqrt(c)) - math.sqrt(c) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b = input().split()
c = int(a + b)

if (int)math.sqrt(c) - math.sqrt(c) == 0:
    print('Yes')
else:
    print('No')