qyliang/CodeNanoFix huggingface dataset:
Buggy code:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq]+=1

    for i in ans:
        print(i)    

if __name__ == "__main__":
    main() 

Fixed code:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()
Buggy code:
from collections import defaultdict
n=int(input())
MAX=10001
RMAX=102
d = defaultdict(int)
for i in range(1,RMAX):
    wkx = i * 1
    if wkx > MAX:
        break
    for j in range(1,RMAX):
        wky = wkx + j * j  + i * j
        if wky > MAX :
            break
        for k in range(1,RMAX):
            wkz = wky + k * k + i * k  + j * k
            if wkz > MAX :
                break
            d[wkz] += 1
            
for i in range(n):
    k = i + 1
    print(d[k])


Fixed code:
from collections import defaultdict
n=int(input())
MAX=10001
RMAX=102
d = defaultdict(int)
for i in range(1,RMAX):
    wkx = i * i
    if wkx > MAX:
        break
    for j in range(1,RMAX):
        wky = wkx + j * j  + i * j
        if wky > MAX :
            break
        for k in range(1,RMAX):
            wkz = wky + k * k + i * k  + j * k
            if wkz > MAX :
                break
            d[wkz] += 1
            
for i in range(n):
    k = i + 1
    print(d[k])
Buggy code:
n=int(input())
z=0
N=[0]*10000
ans=0
ko=0
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ko=x**2+y**2+z**2+x*y+y*z+z*x
            if ko<=n:
                N[ko]+=1
            else:
                break
for i in range(n):
    print(N[i])

Fixed code:
n=int(input())
z=0
N=[0]*10000
ans=0
ko=0
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ko=x**2+y**2+z**2+x*y+y*z+z*x
            if ko<=n:
                N[ko-1]+=1
            else:
                break
for i in range(n):
    print(N[i])
Buggy code:
n = int(input())

ANS = [0] * (n+1)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = (x + y + z)**2 - z*(x + y) - (x*y)
            if tmp > n: continue
            ANS[tmp] += 1

for ans in ANS:
    print(ans)

Fixed code:
n = int(input())

ANS = [0] * (n+1)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = (x + y + z)**2 - z*(x + y) - (x*y)
            if tmp > n: continue
            ANS[tmp] += 1

for ans in ANS[1:]:
    print(ans)
Buggy code:
n = int(input())
ans = [0]*(n+5)

for x in range(1,10):
    for y in range(1,10):
        for z in range(1,10):
            temp = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n>=temp:
                print(x,y,z, temp)
                ans[temp]+=1


for i in range(1,n+1):
    print(ans[i])


Fixed code:
n = int(input())
ans = [0]*(n+5)

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            temp = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n>=temp:
                ans[temp]+=1


for i in range(1,n+1):
    print(ans[i])
Buggy code:
n = int(ipnut())
cnt = [0] * 10001
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            v = x*x + y*y + z*z + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])


Fixed code:
n = int(input())
cnt = [0] * 10001
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            v = x*x + y*y + z*z + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])
Buggy code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n = I()
cnt = [0] * 10001
r_n = int(math.sqrt(n)) + 1
for x in range(1, r_n):
    for y in range(1, r_n):
        for z in range(1, r_n):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])


Fixed code:
import math
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n = I()
cnt = [0] * 10001
r_n = int(math.sqrt(n)) + 1
for x in range(1, r_n):
    for y in range(1, r_n):
        for z in range(1, r_n):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])
Buggy code:
from collections import Counter
n = int(input())
l = list()
for i in range(31):
    l.append((i, i**2))
# print(l)
c = Counter()
for X in l:
    for Y in l:
        for Z in l:
            x = X[0]
            y = Y[0]
            z = Z[0]
            c[X[1]+Y[1]+Z[1]+x*y+y*z+x*z] += 1

for i in range(1, n+1):
    print(c[i])


Fixed code:
from collections import Counter
n = int(input())
l = list()
for i in range(1,101):
    l.append((i, i**2))
# print(l)
c = Counter()
for X in l:
    for Y in l:
        for Z in l:
            x = X[0]
            y = Y[0]
            z = Z[0]
            c[X[1]+Y[1]+Z[1]+x*y+y*z+x*z] += 1

for i in range(1, n+1):
    print(c[i])
Buggy code:
n=int(input())
ans=[0 for i in range(10050)]
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v=i*i+j*j+k*k+i*j+i*k+j*k
      if v<10050:
        ans[v]+=1
for i in range(n):
  print(a[i+1])

Fixed code:
n=int(input())
ans=[0 for i in range(10050)]
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v=i*i+j*j+k*k+i*j+i*k+j*k
      if v<10050:
        ans[v]+=1
for i in range(n):
  print(ans[i+1])
Buggy code:
N = int(input())
ans = [0 for _ in range(10050)]
for i in range(105):
    for j in range(105):
        for k in range(105):
            v = i*i + j*j + k*k + k*j + i*k + i*j
            if v < 10050:
                ans[v] += 1

for i in range(N):
    print(ans[i])

Fixed code:
N = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i + j*j + k*k + k*j + i*k + i*j
            if v < 10050:
                ans[v] += 1

for i in range(N):
    print(ans[i+1])
Buggy code:
import math

n = int(input())

ans = [0 for _ in range(10001)]

for i in range(1,math.ceil(math.sqrt(n))):
    for j in range(1,math.ceil(math.sqrt(n))):
        for k in range(1,math.ceil(math.sqrt(n))):
            v = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if(v < 10001):
                ans[v] += 1

for i in range(n):
    print(ans[i])


Fixed code:
import math

n = int(input())

ans = [0 for _ in range(10001)]

for i in range(1,math.ceil(math.sqrt(n))):
    for j in range(1,math.ceil(math.sqrt(n))):
        for k in range(1,math.ceil(math.sqrt(n))):
            v = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if(v < 10001):
                ans[v] += 1

for i in range(n):
    print(ans[i+1])
Buggy code:
n = int(input())
ans = [0] * (n + 1)
for x in range(1, n):
    if x * x >= n:
        break
    for y in range(1, n):
        if x * x + y * y + x * y >= n:
            break
        for z in range(1, n):
            key = x * x + y * y + z * z + x * y + y * z + z * x
            if key > n:
                break
            ans[key] += 1
for i in range(n + 1):
    print(ans[i])

Fixed code:
n = int(input())
ans = [0] * (n)
for x in range(1, n):
    if x * x > n:
        break
    for y in range(1, n):
        if x * x + y * y + x * y > n:
            break
        for z in range(1, n):
            key = x * x + y * y + z * z + x * y + y * z + z * x
            if key > n:
                break
            ans[key - 1] += 1
for i in range(n):
    print(ans[i])
Buggy code:
n = int(input())
ans = [0 for i in range(10001)]

for i in range(105):
    for j in range(105):
        for m in range(105):
            v = i**2+j**2+m**2+i*j+j*m+m*i
            #print(v)
            if v<10001:
                ans[v]+=1
#print(count)

for i in range(n):
    print(ans[i+1])

Fixed code:
n = int(input())
ans = [0 for i in range(10001)]

for i in range(1,105):
    for j in range(1,105):
        for m in range(1,105):
            v = i**2+j**2+m**2+i*j+j*m+m*i
            #print(v)
            if v<10001:
                ans[v]+=1
#print(count)

for i in range(n):
    print(ans[i+1])
Buggy code:
N=int(input())

a=[0]*N

x=1
while x<N:
    y=1
    while x*x+y*y+x*y<N:
        z=1
        while z*z+x*x+y*y+x*y+z*y+z*x<N:
            a[z*z+x*x+y*y+x*y+z*y+z*x]+=1
            z+=1
        y+=1
    x+=1

for n in a:
    print(n)
    


Fixed code:
N=int(input())

a=[0]*N

x=1
while x*x<=N:
    y=1
    while x*x+y*y+x*y<=N:
        z=1
        while z*z+x*x+y*y+x*y+z*y+z*x<=N:
            a[z*z+x*x+y*y+x*y+z*y+z*x-1]+=1
            z+=1
        y+=1
    x+=1

for n in a:
    print(n)
Buggy code:
import math
n = int(input())
ans=[0]*n
for x in range(1, int(math.sqrt(n))):
    for y in range(1, int(math.sqrt(n))):
        for z in range(1, int(math.sqrt(n))):
            a = x * x + y * y + z * z + x * y + y * z + z * x
            if n >= a >= 1:
                ans[a] += 1
print(*ans,sep="\n")

Fixed code:
import math
n = int(input())
ans = [0] * (n + 1)
for x in range(1, int(math.sqrt(n))):
    for y in range(1, int(math.sqrt(n))):
        for z in range(1, int(math.sqrt(n))):
            a = x * x + y * y + z * z + x * y + y * z + z * x
            if n >= a >= 1:
                ans[a] += 1
print(*ans[1:],sep="\n")
Buggy code:
import math
n = int(input())
ans=[0]*n
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            a = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n >= a >= 1:
                ans[a] += 1
print(*ans,sep="\n")

Fixed code:
n = int(input())
ans=[0]*(n+1)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            a = x * x + y * y + z * z + x * y + y * z + z * x
            if n >= a >= 1:
                ans[a] += 1
print(*ans[1:],sep="\n")
Buggy code:
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())

ans_lis =[0]*10000000


nn=math.sqrt(N)
n=int(nn)
#per_lis=itertools.permutations(list(range(1,4)))
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            tmp=0
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for g in range(n):
    print(ans_lis[g])

Fixed code:
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())

ans_lis =[0]*10000000


nn=math.sqrt(N)
n=int(nn)
#per_lis=itertools.permutations(list(range(1,4)))
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            tmp=0
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for g in range(N):
    print(ans_lis[g])
Buggy code:
import sys
sys.setrecursionlimit(1000000000)
input = sys.stdin.readline
n=int(input())

a=[0]*(n)
for j in range(1,n+1):
    for k in range(1,n+1):
        for l in range(1,n+1):
            if j**2+k**2+l**2+j*k+k*l+l*j>n:
                break
            else:
                a[j**2+k**2+l**2+j*k+k*l+l*j-1]+=1

print(a)

Fixed code:
import sys
sys.setrecursionlimit(1000000000)
input = sys.stdin.readline
n=int(input())

a=[0]*(n)
for j in range(1,n+1):
    for k in range(1,n+1):
        for l in range(1,n+1):
            if j**2+k**2+l**2+j*k+k*l+l*j>n:
                break
            else:
                a[j**2+k**2+l**2+j*k+k*l+l*j-1]+=1

for i in a:
    print(i)
Buggy code:
N = int(input())


ans = [0]*(10**4+1)

for x in range(1, 10**2):
    for y in range(1, 10**2):
        for z in range(1, 10**2):
            n = x**2+y**2+z**2+x*y+y*z+z*x
            if n <10**4+1:
                ans[n] += 1

for i in range(1, N):
    print(ans[i])


Fixed code:
N = int(input())

ans = [0]*(10**4+1)

for x in range(1, 10**2):
    for y in range(1, 10**2):
        for z in range(1, 10**2):
            n = x**2+y**2+z**2+x*y+y*z+z*x
            if n <10**4+1:
                ans[n] += 1

for i in range(1, N+1):
    print(ans[i])
Buggy code:
# n = x^2 + y^2 + z^2 + xy + yz +zx = ((x+y)^2 + (y+z)^2 + (x+z)^2)/2
# 1 <= x, y, z
# n >= 6

import math

N = int(input())
ans = [0] * N

#lim = int(math.sqrt(N/2))
lim = int(math.sqrt(N))
for x in range(1, lim):
    for y in range(1, lim):
        for z in range(1, lim):
            #calc = ((x+y)**2 + (y+z)**2 + (x+z)**2) /2
            calc = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if calc <= N:
                ans[calc -1] += 1

print(ans)


Fixed code:
# n = x^2 + y^2 + z^2 + xy + yz +zx = ((x+y)^2 + (y+z)^2 + (x+z)^2)/2
# 1 <= x, y, z
# n >= 6

import math

N = int(input())
ans = [0] * N

#lim = int(math.sqrt(N/2))
lim = int(math.sqrt(N))
for x in range(1, lim):
    for y in range(1, lim):
        for z in range(1, lim):
            #calc = ((x+y)**2 + (y+z)**2 + (x+z)**2) /2
            calc = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if calc <= N:
                ans[calc -1] += 1

#print(ans)
for a in ans:
    print(a)
Buggy code:
from collections import defaultdict
dict=defaultdict(lambda:0)
n=int(input())

for x in range(1,100):
    for y in range(1, 100):
        for z in range(1,100):
            p=(x+y+z)**2-(x*y+y*z+z*x)
            dict[p]+=1

for i in range(1,n):
    print(dict[i])

Fixed code:
from collections import defaultdict
dict=defaultdict(lambda:0)
n=int(input())

for x in range(1,100):
    for y in range(1, 100):
        for z in range(1,100):
            p=(x+y+z)**2-(x*y+y*z+z*x)
            dict[p]+=1

for i in range(1,n+1):
    print(dict[i])
Buggy code:
n = int(input())

cnt = [0] * n
for x in range(1, int(n ** 0.5) + 1):
    for y in range(1, int(n ** 0.5) + 1):
        for z in range(1, int(n ** 0.5) + 1):
            num = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if num <= n:
                print(num)
                cnt[num - 1] += 1
print(*cnt, sep="\n")


Fixed code:
n = int(input())

cnt = [0] * n
for x in range(1, int(n ** 0.5) + 1):
    for y in range(1, int(n ** 0.5) + 1):
        for z in range(1, int(n ** 0.5) + 1):
            num = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if num <= n:
                cnt[num - 1] += 1
print(*cnt, sep="\n")
Buggy code:
n = int(input())
a = [0] * 10**5
for x in range(1, 101):
	for y in range(1, 101):
    	for z in range(1, 101):
      		a[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1
for i in range(1, n + 1):
	print(a[i])

Fixed code:
n = int(input())
a = [0] * 10**5
for x in range(1, 101):
	for y in range(1, 101):
		for z in range(1, 101):
			a[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1
for i in range(1, n + 1):
	print(a[i])
Buggy code:
n=int(input())
ans = [0 for _in range(10050)]
	for i in range(1,105):
    	for j in range(1,105):
        	for k in range(1,105):
            	v=i*i+j*j+k*k+i*j+j*k+k*i;
              	if v<10050:
                  ans[v]+=1

for i in range(n):
  print(ans[i+1])
  

Fixed code:
n=int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1

for i in range(n):
	print(ans[i+1])
Buggy code:
import math
n=int(input())
ans=[0]*(10**5)
for x in range(int(math.sqrt(n))+1):
  for y in range(int(math.sqrt(n))+1):
    for z in range(int(math.sqrt(n))+1):
      ans[((x+y)**2+(y+z)**2+(z+x)**2)//2-1]+=1

for i in range(n):
  print(ans[i])

Fixed code:
import math
n=int(input())
ans=[0]*(10**5)
for x in range(1,int(math.sqrt(n))+1):
  for y in range(1,int(math.sqrt(n))+1):
    for z in range(1,int(math.sqrt(n))+1):
      ans[((x+y)**2+(y+z)**2+(z+x)**2)//2-1]+=1

for i in range(n):
  print(ans[i])
Buggy code:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

# input = sys.stdin.readline

N = int(input())
ans = [0 for _ in range(10050)]
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            idx = i**2 + j**2 + k **2 + i*j + i*k + j*k
for i in range(N):
  print(ans[i])






Fixed code:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

# input = sys.stdin.readline

N = int(input())
ans = [0 for _ in range(105**3)]
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            idx = i**2 + j**2 + k **2 + i*j + i*k + j*k
            ans[idx-1] += 1
for i in range(N):
    print(ans[i])
Buggy code:
n = int(input())

ans = [0] * (n+1)


def f(x, y, z):
    return x**2+y**2+z**2+x*y+y*z+x*z


for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            c = f(x, y, z)
            if c <= n:
                ans[c] += 1

for a in ans:
    print(a)


Fixed code:
n = int(input())

ans = [0] * (n+1)


def f(x, y, z):
    return x**2+y**2+z**2+x*y+y*z+x*z


for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            c = f(x, y, z)
            if c <= n:
                ans[c] += 1

for i in range(1, n+1):
    print(ans[i])
Buggy code:
n = int(input())
cont = [0 for i in range(10050)]

for x in range(1,105):
  for y in range(1,105):
    for z in range(1,105):
      v = x**2 + y**2 + z**2 + z*x + y*z + x*y
      if v <= 10001:
        cont[v]+=1

for i in range(1,n):
  print(cont[i])

Fixed code:
n = int(input())
cont = [0 for i in range(10050)]

for x in range(1,105):
  for y in range(1,105):
    for z in range(1,105):
      v = x**2 + y**2 + z**2 + z*x + y*z + x*y
      if v <= 10001:
        cont[v]+=1

for i in range(1,n+1):
  print(cont[i])
Buggy code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
d = defaultdict(int)
for i in range(1,25):
    for j in range(1,25):
        for k in range(1,25):
            a = i*i+j*j+k*k+i*j+j*k+k*i
            d[a] += 1
N = int(input())
for i in range(1,N):
    print(d[i])

Fixed code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
d = defaultdict(int)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            a = i*i+j*j+k*k+i*j+j*k+k*i
            d[a] += 1
N = int(input())
for i in range(1,N+1):
    print(d[i])
Buggy code:
n = int(input())
cnt  = [0 for i in range(10001)]

for x in range(1,105):
    for y in range(1, 105):
        for z in range(1, 105):
                ans = x**2 + y**2 + z**2 + x*y + y*z + z*x 
                if ans <= 10000:    
                    cnt[ans] +=1
for i in range(1, N+1):  
    print(cnt[i])


Fixed code:
n = int(input())
cnt  = [0 for i in range(10001)]

for x in range(1,101):
    for y in range(1, 105):
        for z in range(1, 105):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x 
            if ans <= 10000:    
                cnt[ans] +=1
for i in range(1,n+1):  
    print(cnt[i])
Buggy code:
n = int(input())

num = range(1, int(n ** 0.5) + 1)
from itertools import combinations_with_replacement
table = [0] * n
for i in combinations_with_replacement(num, 3):
    #print(i)
    index = (i[0] + i[1] + i[2]) ** 2 - (i[0] * i[1] + i[0] * i[2] + i[1] * i[2])

    if (i[0] + i[1] + i[2]) ** 2 - (i[0] * i[1] + i[0] * i[2] + i[1] * i[2]) > n:
        continue
    if i[0] == i[1] == i[2]:
        table[index - 1] += 1
    elif i[0] != i[1] != i[2]:
        table[index - 1] += 6
    else:
        table[index - 1] += 3
for i in range(1, n):
    print(table[i])

Fixed code:
n = int(input())

num = range(1, int(n ** 0.5) + 1)
from itertools import combinations_with_replacement
table = [0] * n
for i in combinations_with_replacement(num, 3):
    #print(i)
    index = (i[0] + i[1] + i[2]) ** 2 - (i[0] * i[1] + i[0] * i[2] + i[1] * i[2])

    if (i[0] + i[1] + i[2]) ** 2 - (i[0] * i[1] + i[0] * i[2] + i[1] * i[2]) > n:
        continue
    if i[0] == i[1] == i[2]:
        table[index - 1] += 1
    elif i[0] != i[1] != i[2]:
        table[index - 1] += 6
    else:
        table[index - 1] += 3
for i in range(n):
    print(table[i])
Buggy code:
from collections import Counter
n = int(input())
ans_list = [0]*(10**4)
for i in range(1, 100):
  for j in range(1, 100):
    for k in range(1, 100):
      ans = i**2 + j**2 + k**2 + i*j + j*k + k*i
      ans_list[ans-1] += 1
for i in ans_list[:n]:
  print(i)

Fixed code:
from collections import Counter
n = int(input())
ans_list = [0]*(10**6)
for i in range(1, 100):
  for j in range(1, 100):
    for k in range(1, 100):
      ans = i**2 + j**2 + k**2 + i*j + j*k + k*i
      ans_list[ans-1] += 1
for i in ans_list[:n]:
  print(i)
Buggy code:
from sys import stdin
import sys
import math
import random
from decimal import Decimal
import itertools as it

N = int(input())
# for i in range(1,N+1):
f = [0 for i in range(N)]
# print(f)
for x in range(1, 51):
    x2 = x**2
    for y in range(1, 51):
        y2 = y**2
        for z in range(1, 51):
            a = x2+y2+z**2+x*y+y*z+x*z
            if a <= N:
                f[a-1] += 1
print(f)


Fixed code:
from sys import stdin
import sys
import math
import random
from decimal import Decimal
import itertools as it

N = int(input())
# for i in range(1,N+1):
f = [0 for i in range(N)]
# print(f)
for x in range(1, 101):
    x2 = x**2
    for y in range(1, 101):
        y2 = y**2
        for z in range(1, 101):
            a = x2+y2+z**2+x*y+y*z+x*z
            if a <= N:
                f[a-1] += 1
            else:
                break
for i in f:
    print(i)