Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())


def main():
	s = input().split()
    n=int(s[0])
    d = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for i in range(n):
        s = input().split()
        d[s[0]]+=1
    for i in d:
        print(i,' x ',d[i])
main()
'''
if __name__ == '__main__':
    main()
'''
 



Fixed submission:
s = input().split()
n=int(s[0])
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input().split()
    d[s[0]]+=1
for i in d:
    print(i,' x ',d[i])
Buggy python submission (verdict: Runtime Error):
	#f
N = int(input())
X = [0] * N
ans = 0
for i in range(N-1):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    if x > y: x, y = y, x
    ans += (y - x) * (N - y + x + 1)
    X[x] += 1
    X[y] += 1
for i, x in enumerate(X):
    ans += (i + 1) * (N - i) * (2 - x)
print(ans // 2)0

Fixed submission:
#f problem
import math
import re
import os
import sys
N = int(input())
X = [0] * N
ans = 0
for i in range(N-1):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    #take +1 if...
    if x > y: x, y = y, x
    ans += (y - x) * (N - y + x + 1)
    X[x] += 1
    X[y] += 1
    #the pivot off
for i, x in enumerate(X):
    ans += (i + 1) * (N - i) * (2 - x)
print(ans // 2)#//2 -1 possible.  # solution master
Buggy python submission (verdict: Runtime Error):
N = int(input())

for n in range(1, N+1):
    ans = 0
    for x in range(1, 15):
        for y in range(x, 20):
            for z in range(y, 35):
                f = x**2 + y**2 + z**2 + x*y + x*z + y*z
                if f == n:
                    if x == y == z:
                        ans = 1
                    elif (x == y) or (y == z):
                        ans = 3
                    else:
                        ans = 6
    print(ans)


Fixed submission:
l, r, d = map(int, input().split(" "))

ans = 0
for i in range(l, r+1):
    if i % d == 0:
        ans += 1
print(ans)

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

def func(N_max):
#     print(f'N_max:{N_max}')
    cnt = 0
#     flag = False
    ans = []
    
    total = 0

    for x in range(1, N_max):
        x_total = x**2
        if N_max < x_total:
            break
        for y in range(x, N_max):
            y_total = x_total + y**2 + x*y
            if N_max < y_total:
                break

            for z in range(y, N_max):
                total = y_total + z**2+y*z+z*x
                if N_max < total:
                    break
                ans.append((total, change(len(set((x,y,z))))))

    return ans

def change(length):
    if length < 1:
        return 0
    elif length == 1:
        return 1
    elif length == 2:
        return 3
    elif length == 3:
        return 6

data = func(N)
ans_list = [0] * (N)
for d in data:
    ans_list[d[0]-1] = d[1]
for a in ans_list:
    print(a)

Fixed submission:
L,R,d = map(int, input().split())

cnt = 0

for i in range(L, R+1):
  if i % d == 0:
    cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
import numpy as np

_ = input()
data = list(map(int, input().split()))
p = np.prod(data)

if 10 ** 18 < p:
  print(-1)
else:
  print(p)

Fixed submission:
a,b = map(int, input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
_ = input()
data = list(map(int, input().split()))
p = 1
for d in data:
  p *= d

if 10 ** 18 < p:
  print(-1)
else:
  print(p)

Fixed submission:
_ = input()
data = list(map(int, input().split()))
p = 1
m = 10 ** 18

if data.count(0) > 0:
  print(0)
  exit()

for d in data:
  p *= d
  if m < p:
    print(-1)
    exit()
print(p)
Buggy python submission (verdict: Time Limit Exceeded):
from copy import deepcopy

a,b,n = [int(i) for i in input().split()]

score = 0
if a * n / b < 1:
    print(0)
    exit()

for i in range(n+1):
    tmp = int(a * i / b) - a * int(i / b)
    if score <= tmp:
        score = deepcopy(tmp)
    else:
        print(score)
        exit()
print(score)

Fixed submission:

a,b,n = [int(i) for i in input().split()]

score = 0

if n < b:
  print(int(a * n / b) - a * int(n / b))
else:
  n = b-1
  print(int(a * n / b) - a * int(n / b))

Buggy python submission (verdict: Time Limit Exceeded):
from copy import deepcopy

a,b,n = [int(i) for i in input().split()]

score = 0
for i in range(n+1):
    tmp = int(a * i / b) - a * int(i / b)
    if score <= tmp:
        score = deepcopy(tmp)
    else:
        print(score)
        exit()
print(score)

Fixed submission:

a,b,n = [int(i) for i in input().split()]

score = 0

if n < b:
  print(int(a * n / b) - a * int(n / b))
else:
  n = b-1
  print(int(a * n / b) - a * int(n / b))
Buggy python submission (verdict: Time Limit Exceeded):
length = int(input())
data = [int(i) for i in input().split()]

for i in range(1, length+1):
  print(data.count(i))

Fixed submission:
from collections import Counter

length = int(input())
data = [int(i) for i in input().split()]

c = Counter(data)

for i in range(1, length+1):
  print(c[i])
Buggy python submission (verdict: Runtime Error):
k = int(input())
total = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        if gcd(a, b) == 1:
            total += 1 * k
            continue
        else:
            for c in range(1, k + 1):
                total += gcd(a, b, c)
print(total)

Fixed submission:
import math
from functools import reduce

k = int(input())
total = 0

def gcd(*numbers):
    numbers = numbers
    return reduce(math.gcd, numbers)

for a in range(1, k + 1):
    for b in range(1, k + 1):
        if gcd(a, b) == 1:
            total += 1 * k
            continue
        else:
            for c in range(1, k + 1):
                total += gcd(a, b, c)
print(total)
Buggy python submission (verdict: Runtime Error):
n = int(input())

data = '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(data[n])

Fixed submission:
n = int(input())

data = '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(data[n-1])

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

data = '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(data[n])


Fixed submission:
n = int(input())

data = '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(data[n-1])
Buggy python submission (verdict: Runtime Error):
from math import isclose

data = input().split()
a, b, c = [int(i) for i in data]

if isclose(((c-a-b) ** 2) - 4 * a * b, 0, abs_tol=1e-10):
  print('Yes')
else:
  print('No')


Fixed submission:
data = input().split()
a, b, c = [int(i) for i in data]

if c-a-b >= 0:
  
  if ((c-a-b) ** 2) - 4 * a * b > 1e-10:
    print('Yes')
  else:
    print('No')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
def count(b, total, N):
    remain = N%total
    if remain < b:
        return remain
    else:
        return b

data = input()
N, b, r = [int(i) for i in data.split()]
 
ball = int(N/total) * b + count(b, b+r, N)
print(ball)

Fixed submission:
def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)

Buggy python submission (verdict: Runtime Error):
def count(b, total, N):
    remain = N%total
    if remain < b:
        return remain
    else:
		return b

data = input()
N, b, r = [int(i) for i in data.split()]

ball = int(N/total) * b + count(b, b+r, N)
print(ball)

Fixed submission:
def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)

Buggy python submission (verdict: Runtime Error):
def count(b, total, N):
    remain = N%total
    if remain < b:
        return remain
    else:
        return b
      
data = input()
N, b, r = [int(i) for i in data.split()]
 
ball = int(N/total) * b + count(b, b+r, N)
print(ball)

Fixed submission:
def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)

Buggy python submission (verdict: Runtime Error):
def count(b, total, N):
    remain = N%total
    if remain < b:
        return remain
    else:
        return b
      
N, b, r = [int(i) for i in data.split()]

ball = int(N/total) * b + count(b, b+r, N)
print(ball)

Fixed submission:
def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)

Buggy python submission (verdict: Runtime Error):
def count(b):
    remain = N%total
    if remain < b:
        return remain
    else:
        return b
      
 
data = input()

N, b, r = [int(i) for i in data.split()]

ball = int(N/total) * b + count()
print(ball)

Fixed submission:
def count(b, total, N):
  r = N%total
  if r < b:
    return r
  else:
    return b

data = input()
N, b, r = [int(i) for i in data.split()]

total = b + r

ball = int(N/total) * b + count(b, total, N)
print(ball)
Buggy python submission (verdict: Runtime Error):
num = input()
num = int(num)

page = math.ceil(num/2)
print(page)


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

page = int(num/2)

if num%2 != 0:
  page += 1

print(page)

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

print(int(num/2))

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

page = int(num/2)

if num%2 != 0:
  page += 1

print(page)
Buggy python submission (verdict: Runtime Error):
x , n = map(int,input().split())
p_str = input().split()#pはlist
list = []
for i in p_str :
    p = int(i)
    list.append(p)

if not x  in list :
    print(x)
else :
    for i  in range(101):
        y = x - i
        if not y in list :
            print(y)
            break
            z = x + i
        if not z in list :
            print(z)
            break


Fixed submission:
x , n = map(int,input().split())
p_str = []
if n != 0 :
    p_str = input().split()#pはlist
    
list = []

for i in p_str :
    p = int(i)
    list.append(p)

if not x  in list :
    print(x)
else :
    for i  in range(101):
        y = x - i
        if not y in list :
            print(y)
            break
        z = x + i
        if not z in list :
            print(z)
            break
Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout
from collections import Counter

n=int(stdin.readline().strip())
l=[]
for i in range(1,10):
    for j in range(1,10):
        for k in range(1,10):
            l.append((i*i)+(j*j)+(k*k)+(i*j)+(j*k)+(i*k))
ld=dict(Counter(l))

for i in range(1,21):
    if i in ld:
        stdout.write(str(ld[i])+'\n')
    else:
        stdout.write("0"+"\n")


Fixed submission:
from sys import stdin,stdout
l,r,d=list(map(int,stdin.readline().strip().split()))
c=0
if l%d==0 and r%d==0:
    stdout.write(str(int(r/d)-int(l/d)+1)+'\n')
else:
    stdout.write(str(int(r/d)-int(l/d))+'\n')
Buggy python submission (verdict: Runtime Error):
x_ = list(map(int, input().split()))

for i in range(x_):
  if x_[i] == 0:
    print(i)

Fixed submission:
x_ = list(map(int, input().split()))
 
for i in range(len(x_)):
  if x_[i] == 0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
y
XY = list(map(int, input().split()))

if 2 * XY[0] - XY[1] / 2 == 0 and -XY[0] + XY[1] / 2 == 0:
  print('NO')

if 2 * XY[0] - XY[1] / 2 >= 0 and -XY[0] + XY[1] / 2 >= 0:
  print('YES')
else:
  print('NO')

Fixed submission:
XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (XY[1] / 2).is_integer():
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A_V = input().split()
A = int(A_V[0])
V = int(A_V[1])
B_W = input().split()
B = int(B_W[0])
W = int(B_W[1])
T = int(input())

if W - V < 0:
  print('NO')
elif T >= abs(B-A)/(W - V):
  print('YES')
else:
  print('NO')

Fixed submission:
A_V = input().split()
A = int(A_V[0])
V = int(A_V[1])
B_W = input().split()
B = int(B_W[0])
W = int(B_W[1])
T = int(input())
 
if V - W <= 0:
  print('NO')
elif T < abs(B-A)/(V-W):
  print('NO')
else:
  print('YES')
Buggy python submission (verdict: Runtime Error):
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min([abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)

Fixed submission:
from collections import deque
from collections import Counter
N, X, Y = map(int, input().split())

res = deque()

for x in range(1, N):
    for y in range(x + 1, N+1):
        res.append(min(abs(x-y), 1 + abs(X-x) + abs(Y-y)))
resd = Counter(res)

for i in range(1, N):
    if i in resd.keys():
        print(resd[i])
    else:
        print(0)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from collections import deque
from scipy.special import comb
from copy import deepcopy

N = int(input())
A = list(map(int, input().split()))

ldeq = deque()
rdeq = deque(A)

def process(mdeq):
    cm = Counter(mdeq)
    cnt = 0
    for key in cm:
        cnt += comb(cm[key], 2)
    print(int(cnt))

for i in range(N):
    a = rdeq.popleft()
    mdeq = deepcopy(rdeq)
    mdeq.extendleft(ldeq)
    process(mdeq)
    ldeq.append(a)

Fixed submission:
from collections import Counter

N = int(input())
A = list(map(int, input().split()))

cA = Counter(A)

allS = 0
for key in cA:
    allS += cA[key] * (cA[key] - 1) / 2

for i in range(N):
    if A[i] in cA.keys():
        print(int(allS - (cA[A[i]] - 1)))
    else:
        print(int(allS))
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

st = True
for _ in range(Q):
    Query = input().split()
    if Query[0] == '1':
        st = not st
    else:
        if (Query[1] == '1') ^ st:
            S += Query[2]
        else:
            S = Query[2] + S
if st:
    print(S)
else:
    print(S[::-1])

Fixed submission:
from collections import deque
S = input()
Q = int(input())

st = True
deq = deque(S)
for _ in range(Q):
    Query = input().split()
    if Query[0] == '1':
        st = not st
    else:
        if (Query[1] == '1') ^ st:
            deq.append(Query[2])
        else:
            deq.appendleft(Query[2])
if st:
    print(''.join(deq))
else:
    print(''.join(reversed(deq)))

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

for _ in range(Q):
    Query = input().split()
    if Query[0] == '1':
        S = S[::-1]
    else:
        if Query[1] == '1':
            S = Query[2] + S
        else:
            S += Query[2]
print(S)

Fixed submission:
from collections import deque
S = input()
Q = int(input())

st = True
deq = deque(S)
for _ in range(Q):
    Query = input().split()
    if Query[0] == '1':
        st = not st
    else:
        if (Query[1] == '1') ^ st:
            deq.append(Query[2])
        else:
            deq.appendleft(Query[2])
if st:
    print(''.join(deq))
else:
    print(''.join(reversed(deq)))
Buggy python submission (verdict: Runtime Error):
input_int = input().split()

if input_int[0] >= input_int[1] + input_int[2]:
    print('0')
else:
    print(input_int[2] - input_int[0] + input_int[1])

Fixed submission:
input_int = input().split()
input_int = [int(x) for x in input_int]

if input_int[0] > input_int[1] + input_int[2]:
    print(0)
else:
    ans = input_int[2] - input_int[0] + input_int[1]
    print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
if a = A:
  print(T)
elif a = T:
  print(A)
elif a = G:
  print(C)
else:
  print(G)


Fixed submission:
a = input()
if a == "A":
  print("T")
elif a == "T":
  print("A")
elif a == "G":
  print("C")
else:
  print("G")
Buggy python submission (verdict: Runtime Error):
def fx(n):
  cnt = 0

  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula == n:
          cnt+=1
        if formula >= n:
          break
  
  return cnt


n = int(input())
for i in range(1,n+1):
  print(fx(i))



Fixed submission:
l, r, d = input().split()
l = int(l)
r = int(r)
d = int(d)

cnt = 0
for n in range(l, r+1):
  if n%d == 0:
    cnt += 1

print(cnt)

Buggy python submission (verdict: Runtime Error):
def fx(n):
  cnt = 0

  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula == n:
          cnt+=1
        if formula >= n:
          break
  
  return cnt


n = int(input())
for i in range(1,n+1):
  print(fx(i))



Fixed submission:
l, r, d = input().split()
l = int(l)
r = int(r)
d = int(d)

cnt = 0
for n in range(l, r+1):
  if n%d == 0:
    cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
def fx(n):
  cnt = 0

  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        if (1+1+k)**2 - 1*1 - 1*k - k*1 > n: break
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula == n:
          cnt+=1
        if formula >= n:
          break
  
  return cnt


n = int(input())
for i in range(1,n+1):
  print(fx(i))



Fixed submission:
def fx(n):
  s = [0]*(n+1)
  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        if (1+1+k)**2 - 1*1 - 1*k - k*1 > n: break
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula <= n and formula > 0:
          s[formula] += 1
        if formula >= n:
          break
  return s


n = int(input())
s = fx(n)
for i in range(1,n+1):
  print(s[i])

Buggy python submission (verdict: Time Limit Exceeded):
def fx(n):
  cnt = 0

  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula == n:
          cnt+=1
        if formula >= n:
          break
  
  return cnt


n = int(input())
for i in range(1,n+1):
  print(fx(i))



Fixed submission:
def fx(n):
  s = [0]*(n+1)
  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        if (1+1+k)**2 - 1*1 - 1*k - k*1 > n: break
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula <= n and formula > 0:
          s[formula] += 1
        if formula >= n:
          break
  return s


n = int(input())
s = fx(n)
for i in range(1,n+1):
  print(s[i])
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

print(a*b)

Fixed submission:
a,b = input().split()

a = int(a)
b = int(b)

print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
nums = [int(e) for e in input().split()]
# print(nums)

ans = 1

for i in nums:
  ans = ans * i

s = 10**18

if(ans > s):
  print('-1')

else:
  print(ans)

Fixed submission:
import sys
n = input()
nums = [int(e) for e in input().split()]

if 0 in nums:
  print('0')
  sys.exit()

ans = 1
s = 10**18

for i in nums:
  ans = ans * i
  if(ans > s):
    print('-1')
    break


if(ans <= s):
  print(ans)
Buggy python submission (verdict: Runtime Error):
L, R, d = map(int, input().split())
count = 0
for L in range(L, M):
  if (L%2 == 0):
    count +=1
    
  
print(count)


Fixed submission:
L, R, d = map(int, input().split())
count = 0
if ((L and R and d >=1) and (L and R and d <= 100) ):
    for L in range(L, R+1):
        if (L%d == 0):
            count +=1
    print(count)

Buggy python submission (verdict: Runtime Error):
L, R, d = map(int, input().split())
count = 0
for L in range(L, M){
  if (L%2 == 0){
    count +=1
    
  }
}
print(count)


Fixed submission:
L, R, d = map(int, input().split())
count = 0
if ((L and R and d >=1) and (L and R and d <= 100) ):
    for L in range(L, R+1):
        if (L%d == 0):
            count +=1
    print(count)

Buggy python submission (verdict: Runtime Error):
L, R, d = map(int, input().split())
count = 0
for (L,L<=R,L++){
  if (L%2 == 0){
    count +=1
    
  }
}
print(count)

Fixed submission:
L, R, d = map(int, input().split())
count = 0
if ((L and R and d >=1) and (L and R and d <= 100) ):
    for L in range(L, R+1):
        if (L%d == 0):
            count +=1
    print(count)
Buggy python submission (verdict: Runtime Error):
x = int(input())
Counter = 0
Amount = 100

while (Amount < x):
    simpleInterest = finalAmount // 100
    Amount += simpleInterest
    Counter += 1
print(Counter)

Fixed submission:
x = int(input())
timeCounter = 0
finalAmount = 100

while (finalAmount < x):
    simpleInterest = finalAmount // 100
    finalAmount += simpleInterest
    timeCounter += 1
print(timeCounter)
Buggy python submission (verdict: Runtime Error):
 fizzBuzz = []
 inputNumber = int(input())
 for i in range(inputNumber + 1):
     if i % 3 == 0 and i % 5 == 0:
         metCondition = 'FizzBuzz'
     elif i % 5 == 0:
         metCondition = 'Buzz'
     elif i % 3 == 0:
         metCondition = 'Fizz'
     else:
         metCondition = i
     fizzBuzz.append(metCondition)
 metCondition_2 = [num for num in fizzBuzz if isinstance(num, (int, float))]
 print(sum(metCondition_2))

Fixed submission:
fizzBuzz = []
inputNumber = int(input())
for i in range(inputNumber + 1):
    if i % 3 == 0 and i % 5 == 0:
        metCondition = 'FizzBuzz'
    elif i % 5 == 0:
        metCondition = 'Buzz'
    elif i % 3 == 0:
        metCondition = 'Fizz'
    else:
        metCondition = i
    fizzBuzz.append(metCondition)
metCondition_2 = [num for num in fizzBuzz if isinstance(num, (int, float))]
print(sum(metCondition_2))
Buggy python submission (verdict: Runtime Error):
    x, y ,z = map(int, input().split())
    x, y, z = y,x,z
    y,x,z = z,x,y
    print(y,x,z)


Fixed submission:
x, y ,z = map(int, input().split())
print(z,x,y)
Buggy python submission (verdict: Runtime Error):
a = map(int, input().split())
print(n*(n-1)//2 + m*(m-1)//2)


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

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

Fixed submission:
n, m = map(int, input().split())
print(n*(n-1)//2 + m*(m-1)//2)
Buggy python submission (verdict: Runtime Error):
from math import sqrt
N=int(input())
num=1
def checker(n):
    hoge=n
    if hoge>2:
        hoge=n-2
    count=0
    x=1
    for a in range(int(sqrt(hoge))):
        y=1
        for b in range(int(sqrt(hoge))):
            z=1
            for c in range(int(sqrt(hoge))):
                ans=x*x+y*y+z*z+x*y+x*z+z*y
                if ans==n:
                    count=count+1
                z=z+1
            y=y+1
        x=x+1
    return count
for i in range(N):
    print(checker(num)) 
    num=num+1

Fixed submission:
N, M, K = map(int, input().split())
count=0
for i in range(M-N+1):
    ans=N%K
    if ans==0:
        count=count+1
    N=N+1
 
print(count)
Buggy python submission (verdict: Runtime Error):
import random
i = input()
len_i = len(i)
num = random.randint(0, len_i-4)
print(i[num]+i[num+1]+i[num+2])

Fixed submission:
import random
i = input()
len_i = len(i)
num = 0
if len_i!=3:
    num = random.randint(0, len_i-4)
print(i[num]+i[num+1]+i[num+2])