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

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

Buggy submission (verdict: Runtime Error):
N = int(input())
B = [int(i) for i in input().split()]
S = [0]*N
cnt = 0
for i in range(N-1, -1, -1):
  A = S[i::i+1]
  if sum(A)%2 == B[i]:
    continue
  elif sum(A)%2 == 0 and B[i] == 1:
    S[i] += 1
    cnt += 1
  elif sum(A)%2 == 1 and B[i] == 0:
    S[i] += 1
    cnt += 1
print(cnt)
for i in range(N):
  if S[i] == 1:
    print(i+1, end=" ")
Problem p02995 (python)

Fixed submission:
from functools import reduce
from fractions import gcd
def lcm(x,y):return x*y//gcd(x,y)
def lcmm(l):return reduce(lcm,l)
a,b,c,d = map(int,input().split())
l =[c, d]
num = a // c
if a%c==0:
  num -= 1
num1 = b // c
num2 = a // d
if a%d==0:
  num2 -= 1
num3 = b// d
e = lcmm(l)
num4 = a // e
if a%e==0:
  num4 -= 1
num5 = b // e
print((b-a+1)-((num1-num)+(num3-num2)-(num5-num4)))

Buggy submission (verdict: Runtime Error):
import fractions
import math
def custom_round(number, ndigits=0):
    if type(number) == int:
        return number
    d_point = len(str(number).split('.')[1])
    if ndigits >= d_point:
        return number
    c = (10 ** d_point) * 2 
    return round((number * c + 1) / c, ndigits)
a, b, c, d = map(int,input().split())
c1 = a / c
c2 = b / c
d1 = a / d
d2 = b / d
e1 = custom_round(c2-c1)
e2 = custom_round(d2-d1)
lcm = c * d // fractions.gcd(c, d)
lcm1 = a / lcm
lcm2 = b / lcm
e3 = custom_round(lcm2-lcm1)
sum = e1+e2-e3
print(int(b-a+1-sum))
Problem p03035 (python)

Fixed submission:
a, b = map(int,input().split())
if a <= 5:
  print(0)
elif 5 < a <= 12:
  print(int(b/2))
elif 13 <= a:
  print(b)

Buggy submission (verdict: Runtime Error):
n, m = map(int,input().split())
a, b = map(int,input().split())
cnt = 0
for i in range(1, m):
  l, r = map(int,input().split())
  if (l > b and r > b) or (l < a and r < a):
    print(0)
    exit()
  if a<=l<=b:
    a = l
  if r <= b:
    b = r
print(b-a+1)
Problem p03037 (python)

Fixed submission:
n, m = map(int,input().split())
a, b = map(int,input().split())
cnt = 0
for i in range(1, m):
  l, r = map(int,input().split())
  if (l > b and r > b) or (l < a and r < a):
    print(0)
    exit()
  if a<=l<=b:
    a = l
  if r <= b:
    b = r
print(b-a+1)

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
a, b = map(int,input().split())
if M > 1:
  for i in range(M-1):
    c, d = map(int,input().split())
    if c > b or d < a:
      continue
    elif a <= c <= b and b < d:
      l0 = list(range(c,b+1))
    elif a <= c <= b and b >= d:
      l0 = list(range(c, d+1))
    elif a <= d <= b and c < a:
      l0 = list(range(a, d+1))
    elif a <= d <= b and c >= a:
      l0 = list(range(c, d+1))
    a = l0[0]
    b = l0[-1]
else:
  l0 = list(range(a, b+1))
print(len(l0))

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
a, b = map(int,input().split())
for i in range(M-1):
  l = []
  c, d = map(int,input().split())
  l1 = list(range(c,d+1))
  for j in l1:
    if a <= j <= b:
      l.append(j)
  a = l[0]
  b = l[-1]
print(len(l))

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
a, b = map(int,input().split())
l = list(range(a,b+1))  
for i in range(M-1):
  l2 = []
  c, d = map(int,input().split())
  l1 = list(range(c,d+1))  
  for j in l1:
    if j in l:
      l2.append(j)
  l = l2
print(len(l2))
Problem p03061 (python)

Fixed submission:
import fractions
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
    left[i + 1] = (fractions.gcd(left[i],a[i]))
    right[n - i - 1] = (fractions.gcd(right[n - i],a[n - 1 - i]))
ans = 0
for i in range(n):
    ans = max(ans,fractions.gcd(left[i],right[i + 1]))
print(ans)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
n = int(input())
A = list(map(int,input().split()))
B = A.copy()
ans1 = reduce(gcd, A)
for i in range(n-1):
  A.pop(i)
  ans = reduce(gcd, A)
  A = B
  if ans > ans1: 
    print(ans)
    exit()
print(ans1)
Problem p03076 (python)

Fixed submission:
A = [int(input()) for i in range(5)]
B = [a - a % 10 + 10 if a % 10 != 0 else a for a in A]
diff = [(b - a) for a, b in zip(A, B)]
print(sum(B)-max(diff))

Buggy submission (verdict: Runtime Error):
a = []
for i in range(5):
  num = input()
  a.append(num)
if int(a[0][2]) <= int(a[1][2]) and int(a[0][2]) <= int(a[2][2]) and int(a[0][2]) <= int(a[3][2]) and int(a[0][2]) <= int(a[4][2]):
  b = int(a[1]) + 10-int(a[1][2]) + int(a[2]) + 10-int(a[2][2]) + int(a[3]) + 10-int(a[3][2]) + int(a[4]) + 10-int(a[4][2]) + int(a[0])
  print(b)
elif int(a[1][2]) <= int(a[0][2]) and int(a[1][2]) <= int(a[2][2]) and int(a[1][2]) <= int(a[3][2]) and int(a[1][2]) <= int(a[4][2]):
  b = int(a[0]) + 10-int(a[0][2]) + int(a[2]) + 10-int(a[2][2]) + int(a[3]) + 10-int(a[3][2]) + int(a[4]) + 10-int(a[4][2]) + int(a[1])
  print(b)
elif int(a[2][2]) <= int(a[0][2]) and int(a[2][2]) <= int(a[1][2]) and int(a[2][2]) <= int(a[3][2]) and int(a[2][2]) <= int(a[4][2]):
  b = int(a[0]) + 10-int(a[0][2]) + int(a[1]) + 10-int(a[1][2]) + int(a[3]) + 10-int(a[3][2]) + int(a[4]) + 10-int(a[4][2]) + int(a[2])
  print(b)
elif int(a[3][2]) <= int(a[0][2]) and int(a[3][2]) <= int(a[1][2]) and int(a[3][2]) <= int(a[2][2]) and int(a[3][2]) <= int(a[4][2]):
  b = int(a[0]) + 10-int(a[0][2]) + int(a[1]) + 10-int(a[1][2]) + int(a[2]) + 10-int(a[2][2]) + int(a[4]) + 10-int(a[4][2]) + int(a[3])
  print(b)
elif int(a[4][2]) <= int(a[0][2]) and int(a[4][2]) <= int(a[1][2]) and int(a[4][2]) <= int(a[2][2]) and int(a[4][2]) <= int(a[3][2]):
  b = int(a[0]) + 10-int(a[0][2]) + int(a[1]) + 10-int(a[1][2]) + int(a[2]) + 10-int(a[2][2]) + int(a[3]) + 10-int(a[3][2]) + int(a[4])
  print(b)
Problem p03078 (python)

Fixed submission:
x, y, z, k = [int(n) for n in input().split()]
va = sorted([int(n) for n in input().split()], reverse=True)
vb = sorted([int(n) for n in input().split()], reverse=True)
xy = min(x*y, k)
vab = (sorted([a + b for a in va for b in vb], reverse=True))[:xy]
vc = sorted([int(n) for n in input().split()], reverse=True)
xyz = min(x*y*z, k)
print(*((sorted([ab + c for ab in vab for c in vc], reverse=True))[:xyz]), sep="\n")

Buggy submission (verdict: Runtime Error):
x, y, z, k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
D = []
E = []
for i in range(x):
  for j in range(y):
    D.append(A[i]+B[j])
D.sort()
for i in range(z):
  for j in range(1, k+1):
    E.append(C[i]+D[-j])
print("\n".join(map(str,sorted(E)[::-1][:k])))
Problem p03086 (python)

Fixed submission:
a = input()
b = 0
c = ["A","C","G","T"]
d = []
for i in range(len(a)):
    if a[i] in c:
      b += 1  
      d.append(b)
    else:
      b = 0
      d.append(b)
#print(d)
print(max(d))

Buggy submission (verdict: Runtime Error):
a = input()
b = 0
c = ["A","C","G","T"]
d = []
for i in range(len(a)):
    if a[i] in c:
      b += 1    
    else:
      d.append(b)
      b = 0
#print(d)
print(max(d))
Problem p03106 (python)

Fixed submission:
a, b, c = map(int, input().split())
list = []
list1 = []
for i in range(a):
  d = a % (i+1)
  if d == 0:
    list.append(i+1)
  else:
    pass
for k in range(len(list)):
  e = b % list[k]
  if e == 0:
    list1.append(list[k])
  else:
    pass
print(list1[-c])

Buggy submission (verdict: Runtime Error):
a, b, k = map(int,input().split())
l = []
for i in range(1,max(a,b)):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[-2])
Problem p03109 (python)

Fixed submission:
a, b, c = input().split("/")
print("Heisei" if b in ["01","02","03","04"] else "TBD")

Buggy submission (verdict: Runtime Error):
a, b, c = input.split("/")
print("Heisei" if b in ["01","02","03","04"] else "TBD")

Buggy submission (verdict: Runtime Error):
a, b, c = input.split("/")
print("Heisei" if "Heisei" in ["01","02","03","04"] else "TBD")
Problem p03110 (python)

Fixed submission:
num = int(input())
sum = 0

while num > 0:
  a,b = input().split(" ")
  if b == "JPY":
    sum += int(a)
    
  else:
    c = float(a) * 380000
    sum += c
  num -= 1    
print(sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(N):
  x, u = map(int,input().split())
  if u == "BTC":
    ans += float(x)*380000
  else:
    ans += int(x)
print(ans)

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

for i in range(num):
  a,b = input().split(" ")
  if b == "JPY":
    a = int(a)
    sum += a
  
  else:
    a = int(a)
    c = a * 380000
    sum += c
   
print(sum)
Problem p03146 (python)

Fixed submission:
a = int(input())
list1 = [a]
count = 1
while True:
  if a % 2 == 0:
    a = int(a / 2)
    if a in list1:
      count += 1
      break
    list1.append(a)  
  else:
    a = int(a*3 + 1)
    if a in list1:
      count += 1
      break
    list1.append(a)
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S = int(input())
l = []
while (S not in l):
  l.append(S)
  if S%2 == 0:
    S //= 2
  else:
    S = 3*S+1
print(len(S)+1)
Problem p03206 (python)

Fixed submission:
a = int(input())
if a == 25:
  print("Christmas")
elif a == 24:
  print("Christmas Eve")
elif a == 23:
  print("Christmas Eve Eve")
else:
  print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
if int(input()) == 25:
  print("Christmas")
elif int(input()) == 24:
  print("Christmas Eve")
elif int(input()) == 23:
  print("Christmas Eve Eve")
else:
  print("Christmas Eve Eve Eve")
Problem p03211 (python)

Fixed submission:
a = input()
list1 = []
for i in range(len(a)):
  b = int(a[i:i+3])
  c = abs(753 - b)
  list1.append(c)
  if i == len(a)-3:
    break
print(min(list1))

Buggy submission (verdict: Runtime Error):
s = int(input())
print(min(abs(int(s[i:i+3]-753) for i in range(len(s)-2)))

Buggy submission (verdict: Runtime Error):
s = int(input())
print(min(abs(int(s[i:i+3]-753) for i in range(len(s))))
Problem p03282 (python)

Fixed submission:
S = input()
k = int(input())
d = {}
cnt = 0
for i, s in enumerate(S):
  if s == "1":
    cnt += 1
    if i+1 == k:
      print(s)
      exit()
  else:
    print(s)
    exit()
if cnt == len(S):
  print("1")

Buggy submission (verdict: Runtime Error):
S = input()
k = int(input())
for i, s in enumerate(S):
  if s == "1" and i+1==k:
    print(s)
    break()
  else:
    print(s)
    break
Problem p03284 (python)

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

Buggy submission (verdict: Runtime Error):
print((eval(input().replace(" ","%")>0)+0)
Problem p03296 (python)

Fixed submission:
import math
n = int(input())
A = [int(i) for i in input().split()]
cnt, ans = 0, 0
for i in range(n-1):
  if A[i] == A[i+1]:
    cnt += 1
    if i == n-2:
      ans += math.floor((cnt+1)/2)
  else:
    ans += math.floor((cnt+1)/2)
    cnt = 0
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
A = [int(i) for i in input().split()]
cnt, ans = 0, 0
for i in range(n):
  if A[i] == A[i+1]:
    cnt += 1
  else:
    ans += math.floor((cnt+1)/2)
    cnt = 0
print(ans)
Problem p03324 (python)

Fixed submission:
a, b = map(int,input().split())
if a == 0 and b == 100:
  print(101)
elif a == 1 and b == 100:
  print(10100)
elif a == 2 and b == 100:
  print(1010000)
else:
  print((100**a)*b)

Buggy submission (verdict: Runtime Error):
a, b = int(input())
print((100**a)*b)
Problem p03328 (python)

Fixed submission:
import math

a, b = map(int,input().split())
c = b - a
for i in range(1,999):
  d = sum(range(1,i+2)) - sum(range(1,i+1))
  if d == c:
    e = sum(range(1,i+1)) - a
print(e)

Buggy submission (verdict: Runtime Error):
import math

a, b = map(int,input().split())
c = b - a
for i in range(1,999):
  d = sum(range(i+1)) - sum(range(i))
  if d == c:
    e = sum(range(i)) - a
print(e)
Problem p03338 (python)

Fixed submission:
N = int(input())
S = input()
max = 0
for i in range(1, N-1):
  X = set(S[0:i])
  Y = set(S[i:N])
  if max < len(X&Y):
    max = len(X&Y)
print(max)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(max(len(s[:i]&s[i:]) for i in range(n)))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(max(len(set(s[:i])&set(s[i:]) for i in range(n))))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(max(len(s[:i]&s[i:] for i in range(n))))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(max(len(set(s[:i])&set(s[i:])) for i in range(n))
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 = mao(int,input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Buggy submission (verdict: Runtime Error):
a, b = mao(int,input().split())
if a < b:
  print(a-1)
else:
  print(a)
Problem p03361 (python)

Fixed submission:
H,W=map(int,input().split())
S=["."+input()+"." for i in range(H)]
S=["."*(W+2)]+S+["."*(W+2)]
flag=0
for i in range(H):
    for j in range(W):
        if S[i][j]=="#":
            if S[i-1][j]=="." and S[i+1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":
                flag=1
print("Yes" if flag==0 else "No")

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
S = ["."+input()+"." for i in range(H)]
#print(S)
S = ["."*(H+2)]+S+["."*(W+2)]
#print(S)
flag = 0
for i in range(H):
  for j in range(W):
    if S[i][j] == "#":
      #print(i, j)
      if S[i-1][j] == "." and S[i+1][j] == "." and S[i][j-1] == "." and S[i][j+1] == ".":
        flag = 1
print("Yes" if flag==0 else "No")
Problem p03408 (python)

Fixed submission:
n = int(input())
d1 = {}
for i in range(n):
  s = input()
  if s not in d1.keys():
    d1[s] = 1
  else:
    d1[s] += 1
m = int(input())
for j in range(m):
  t = input()
  if t not in d1.keys():
    d1[t] = -1
  else:
    d1[t] -= 1
print(max(d1.values()) if max(d1.values()) > 0 else 0)

Buggy submission (verdict: Runtime Error):
n = [input() for i in range(int(input()))]
m = [input() for i in range(int(input()))]
l = list(set(n))
print(max(0, max(n.count(l[i])-m.count(l[i]) for i in range(len(l))))
Problem p03416 (python)

Fixed submission:
a, b = map(int,input().split())
c = list(range(a,b+1))
count = 0
for i in c:
  j = str(i)
  if j[0] == j[4] and j[1] == j[3]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
print(sum(i==i[::-1] for i in map(str, range=(a,b+1))))
Problem p03423 (python)

Fixed submission:
a = int(input())
print(a//3)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(input())
print(S)
if len(set(S)) == 3:
  print("Three")
else:
  print("Four")

Buggy submission (verdict: Runtime Error):
a = int(input)
print(a//3)
Problem p03447 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
print((a-b) % c)

Buggy submission (verdict: Runtime Error):
from itertools import accumulate
n = int(input())
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
a1 = list(accumulate(A1))
ans = 0
for i in range(n):
  sums = a1[i]
  A3 = A2[i:]
  a2 = list(accumulate(A3))
  sums += max(a2)
  ans = max(ans,sums)
print(ans)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
sum = a*b
if sum // 2 = 0:
  print("Even")
  
else:
  print("Odd")
Problem p03477 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
l = a+b
r = c+d
if l > r:
  print("Left")
elif l < r:
  print("Right")
else:
  print("Balanced")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
l = a+b
r = c+d
print("Left" if l > r "Right" elif l < r else "Balanced")
Problem p03493 (python)

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

Buggy submission (verdict: Runtime Error):
n, k = map(int,input().split())
a = list(map(int,input().split()))
d = {}
count = 0
for i in a:
  if i not in d.keys():
    d[i] = 1
  else:
    d[i] += 1
d = sorted(d.values())
for i, j in enumerate(d):
  if len(d) > k:
    count += j
    del d[i]
  else:
    break
print(count)
Problem p03565 (python)

Fixed submission:
def main():
    s = input()
    t = input()
    T = len(t)
    candidate = []
    for i in range(len(s)-T+1):
        buf = s[i:i+T]
        flag = True
        for b, tc in zip(buf, t):
            if b == "?" or b == tc:
                continue
            else:
                flag = False
                break
        if flag == True:
            candidate.append(i)
    if len(candidate) == 0:
        print("UNRESTORABLE")
    else:
        print((s[:candidate[-1]] + t + s[candidate[-1]+T:]).replace("?", "a"))
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
ind = 0
w = ""
for i in range(len(S)):
  if S[i] == "?" or S[i] == T[ind]:
    ind += 1
    if ind == len(T):
      w += T
      for j in range(i+1,len(S)):
        w += S[j]
      break
  else:
    for k in range(ind, 0 , -1):
      w += S[i-k]
    ind = 0
    w += S[i]
if ind < len(T):
  print("UNRESTORABLE")
else:
  for i in range(len(w)):
    if w[i] == "?":
      ans = w.replace("?", "a")
  print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
ind = 0
w = ""
for i in range(len(S)):
  if S[i] == "?" or S[i] == T[ind]:
    ind += 1
    if ind == len(T):
      w += T
      for j in range(i+1,len(S)):
        w += S[j]
      break
  else:
    for k in range(ind, 0 , -1):
      w += S[i-k]
    ind = 0
    w += S[i]
if ind < len(T):
  print("UNRESTORABLE")
else:
  print(w)
  for i in range(len(w)):
    if w[i] == "?":
      ans = w.replace("?", "a")
  print(ans)
Problem p03573 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a == b:
  print(c)
elif a == c:
  print(b)
else:
  print(a)

Buggy submission (verdict: Runtime Error):
h, w = map(int,input().split())
s = [input() for i in range(h)]
for i in range(h):
  l = ""
  for j in range(w):
    if s[i][j] == "#":
      l += "#"
    else:
      l += str(sum([t[max(0,j-1):min(w,j+2)].count("#") for t in s[max(0,i-1):min(h,i+2)]]))
  print(l)
Problem p03588 (python)

Fixed submission:
n = int(input())
A = []
B = []
for i in range(n):
  a, b = map(int,input().split())
  A.append(a)
  B.append(b)
print(max(A)+min(B))

Buggy submission (verdict: Runtime Error):
n = int(input())
A = []
B = []
for i in range(n):
  a, b = map(int,input().split())
  A.append(a)
  B.append(b)
print(max(a)+min(b))
Problem p03611 (python)

Fixed submission:
n = int(input())
cnt = [0] * 100002
a = list(map(int, input().split()))
for v in a:
    cnt[v] += 1
    cnt[v+1] += 1
    cnt[v+2] += 1
    
print(max(cnt))

Buggy submission (verdict: Runtime Error):
n = int(input())
A = list(map(int,input().split()))
l = []
for i in range(min(A),max(A)):
  cnt = 0
  for a in A:
    if i == a or i == a-1 or i == a+1:
      cnt += 1
  l.append(cnt)
print(max(l))
Problem p03612 (python)

Fixed submission:
n = int(input())
P = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
  if i == n-1 and P[i]==i+1:
    cnt += 1
    break
  if i+1==P[i]:
    a = P[i]
    P[i] = P[i+1]
    P[i+1] = a
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
P = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
  if i+1==P[i]:
    a = P[i]
    P[i] = P[i+1]
    P[i+1] = a
    cnt += 1
print(cnt)
Problem p03623 (python)

Fixed submission:
a, b, c= map(int, input().split())
if abs(a-b) > abs(a-c):
  print("B")
else:
  print("A")

Buggy submission (verdict: Runtime Error):
n = int(input())
L = [int(i) for i in input().split()]
cnt = 0
ans = 1
for i in sorted(set(L),reverse=True):
  if L.count(i)>=4 and cnt==0:
    ans = i*i
    break
  elif 2<=L.count(i)<4:
    ans *= i
    cnt += 1
    if cnt == 2:
      break
  elif L.count(i)>=4 and cnt==1:
    ans *=i
    break
print(0 if ans==1 else ans)
Problem p03693 (python)

Fixed submission:
a, b, c = input().split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
num = a+b+c
if num % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO)

Buggy submission (verdict: Runtime Error):
a, b, c = input.split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO)
Problem p03795 (python)

Fixed submission:
a = int(input())
b = a * 800
if a >= 15:
    c = (a // 15) * 200
    print(b-c)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = a * 800
if a >= 15:
    c = (a // 15) * 200
print(b-c)
Problem p03796 (python)

Fixed submission:
import math

n = int(input())
C = 10**9 + 7
print(math.factorial(n)%C)

Buggy submission (verdict: Runtime Error):
import math
print(math.factorial(int(input())%10**9+7)
Problem p03826 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
s1 = a*b
s2 = c*d
if s1 >= s2:
  print(s1)
else:
  print(s2)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int.input().split())
s1 = a*b
s2 = c*d
if s1 >= s2:
  print(s1)
else:
  print(s2)
Problem p03943 (python)

Fixed submission:
a = list(map(int, input().split()))
a.sort()
if a[0]+a[1] == a[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
a.sorted()
if a[0]+a[1] == a[2]:
  print("Yes")
else:
  print("No")
Problem p03998 (python)

Fixed submission:
Sa = list(input())
Sb = list(input())
Sc = list(input())
d = Sa[0]
for i in range(300):
  if d == "a":
    d = Sa.pop(0)
  elif d == "b":
    d = Sb.pop(0)
  else:
    d = Sc.pop(0)
  if Sa == [] and d == "a":
    print("A")
    break
  elif Sb == [] and d == "b":
    print("B")
    break
  elif Sc == [] and d == "c":
    print("C")
    break

Buggy submission (verdict: Runtime Error):
S = {c:input() for c in "abc"}
s = "a"
while S[s]:
  s = S[s].pop(0)
print(s.upper())

Buggy submission (verdict: Runtime Error):
Sa = list(input())
Sb = list(input())
Sc = list(input())
d = Sa.pop(0)
for i in range(305):
  if d == "a":
    d = Sa.pop(0)
  elif d == "b":
    d = Sb.pop(0)
  else:
    d = Sc.pop(0)
  if Sa == [] and d == "a":
    print("A")
    break
  elif Sb == [] and d == "b":
    print("B")
    break
  elif Sc == [] and d == "c":
    print("C")
    break

Buggy submission (verdict: Runtime Error):
Sa = list(input())
Sb = list(input())
Sc = list(input())
d = Sa.pop(0)
for i in range(300):
  if d == "a":
    d = Sa.pop(0)
  elif d == "b":
    d = Sb.pop(0)
  else:
    d = Sc.pop(0)
  if Sa == [] and d == "a":
    print("A")
    break
  elif Sb == [] and d == "b":
    print("B")
    break
  elif Sc == [] and d == "c":
    print("C")
    break
Problem p04033 (python)

Fixed submission:
a, b = map(int,input().split())
if a <=0 and b >= 0:
  print("Zero")
elif (b-a) % 2 == 0 and a < 0 and b < 0:
  print("Negative")
elif a ==0 or b == 0:
  print("Zero")
else:
  print("Positive")

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
c = list(range(a,b+1))
num = 1
for i in c:
  num *= i
if num > 0:
  print("Positive")
elif num < 0:
  print("Negative")
else:
  print("Zero")
Problem p04044 (python)

Fixed submission:
a, b = map(int, input().split())
list = []
for i in range(a):
  word = input()
  list.append(word)
  
c = sorted(list)
d = ""
for j in range(a):
  d += c[j]
print(d)

Buggy submission (verdict: Runtime Error):
N, L = map(int,input().split())
S = sorted([input() for i in range(n)])
print(*S, sep="")
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(a * b % 2 == 0 ? "Even" : "Odd")
Problem p03493 (python)

Fixed submission:
a, b, c=map(int,list(input()))
print(a+b+c)

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