qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n = int(input())
ans = [0] * (n + 1)
for x in range(1, n):
    for y in range(1, n):
        for z in range(1, n):
            if x**2 + y**2 + z**2 + x*y + y*z + z*x <= n:
                ans[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 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):
            val = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if val <= n:
                ans[val] += 1
 
print(*ans[1:], sep="\n")
Buggy code:
n=int(input())
a=[0]*10001
for i in range(101):
  for j in range(101):
    for k in range(101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<=10000:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Fixed code:
n=int(input())
a=[0]*10001
for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])
Buggy code:
n=int(input())
ans=[0 for _ in range(10050)]
for i in range(105):
  for j 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
from queue import PriorityQueue
from sys import stdin,stdout
from collections import defaultdict

def solve():
	n=int(input())
	ans=[0 for _ in range(20005)]
	for i in range(1,101):
		for j in range(1,101):
			for k in range(1,101):
				v=i*i+j*j+k*k+i*j+k*j+k*i
				ans[v]+=1
	for i in range(n):
		print(ans[i+1])
    

    
    
    
def main():
	solve()
main()


Fixed code:
import math
from queue import PriorityQueue
from sys import stdin,stdout
from collections import defaultdict

def solve():
    n=int(input())
    ans=[0 for _ in range(200050)]
    for i in range(1,101):
        for j in range(1,101):
            for k in range(1,101):
                v=i*i+j*j+k*k+i*j+k*j+k*i
                ans[v]+=1
    for i in range(n):
        print(ans[i+1])
    

    
    
    
def main():
    solve()
main()
Buggy code:
def main():
    N = int(input())
    ans = [0]*(N+1)
    for x in range(1, N+1):
        if N < x**2:
            break
        for y in range(1, N+1):
            if N < x**2 + y**2 + x*y:
                break
            for z in range(1, N+1):
                if N < x**2 + y**2 + z**2 + x*y + y*z + z*x:
                    break
                ans[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1

    print(*ans, sep="\n")


if __name__ == '__main__':
    main()


Fixed code:
def main():
    N = int(input())
    ans = [0]*(N+1)
    for x in range(1, N+1):
        if N < x**2:
            break
        for y in range(1, N+1):
            if N < x**2 + y**2 + x*y:
                break
            for z in range(1, N+1):
                if N < x**2 + y**2 + z**2 + x*y + y*z + z*x:
                    break
                ans[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1

    print(*ans[1:], sep="\n")


if __name__ == '__main__':
    main()
Buggy code:
def main():
    import sys
    N=int(sys.stdin.readline())
    L=[0]*(10**4+1)
    for x in range(1,1000):
        for y in range(x,1000):
            for z in range(y,1000):
                r=x**2+y**2+z**2+x*y+y*z+z*x
                if r>10**4:
                    break
                
                c=len(set((x,y,z)))
                if c==3:
                    L[r]+=6
                elif c==2:
                    L[r]+=3
                elif c==1:
                    L[r]+=1


    for t in L[1:N]:
        print(t)
main()

Fixed code:
def main():
    import sys
    N=int(sys.stdin.readline())
    L=[0]*(10**4+1)
    for x in range(1,1000):
        for y in range(x,1000):
            for z in range(y,1000):
                r=x**2+y**2+z**2+x*y+y*z+z*x
                if r>10**4:
                    break
                
                c=len(set((x,y,z)))
                if c==3:
                    L[r]+=6
                elif c==2:
                    L[r]+=3
                elif c==1:
                    L[r]+=1


    for t in L[1:N+1]:
        print(t)

main()
Buggy code:
n = int(input())
ans = [0]*(10**4+1)
for x in range(10**2+1):
    for y in range(10**2+1):
        for z in range(10**2+1):
            i = x*x + y*y + z*z + x*y + x*z + y*z
            if i <= 10**4:
                ans[i] += 1
            else:
                break

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

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

DP = [0]*(N)

for x in range(1,round(N**0.5)):
    for y in range(1,round(N**0.5)):
        for z in range(1,round(N**0.5)):
            hoge = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x - 1

            if hoge <= N:
                DP[hoge-1] += 1
            else:
                break

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


Fixed code:
N = int(input())

DP = [0]*(N+1)

for x in range(1,round(N**0.5)):
    for y in range(1,round(N**0.5)):
        for z in range(1,round(N**0.5)):
            hoge = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x

            if hoge <= N:
                DP[hoge] += 1
            else:
                break

for i in range(1,N+1):
    print(DP[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):
            s = x**2 + y**2 + z**2
            s += x*y + y*z + z*x
            if s <= N:
                ans[s] += 1

for i in ans:
    print(i)

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):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if s <= N:
                ans[s] += 1

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

N=int(input())

a = [0] * N

if N >= 6:
    for x,y,z in itertools.combinations_with_replacement(list(range(1,N)), 3):
        f = (x+y+z)**2 - x*y - y*z - x*z
        if f <= N:
            if x==y==z:
                a[f-1] += 1
            elif x==y or y== z:
                a[f-1] += 3
            else:
                a[f-1] += 6
        elif f >= 2*N:
            break
[print(ans) for ans in a]

Fixed code:
import itertools
import math
N=int(input())

a = [0] * N

b = [1,1,1]

if N >= 6:
    for x,y,z in itertools.combinations_with_replacement(list(range(1,int(math.sqrt(N)) +1 )), 3):
        f = x**2 +y**2 +z**2 + x*y + y*z + x*z
        if f <= N:
            if x==y==z:
                a[f-1] += 1
            elif x==y or y== z:
                a[f-1] += 3
            else:
                a[f-1] += 6
        # elif f >= 2*N:
        #     break
[print(ans) for ans in a]
Buggy code:
import numpy as np

N = int(input())
res = np.zeros(N)

th = int(np.sqrt(N))
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N):
    print(int(res[i]))

Fixed code:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))
Buggy code:
N = int(input())

ret = [0 for i in range(N)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a < N:
                ret[a] += 1

for i in ret:
    print(i)


Fixed code:
N = int(input())
#N = 20

ret = [0 for i in range(N)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= N:
                ret[a-1] += 1

for i in ret:
    print(i)
Buggy code:
n = int(input())
li = [0]*n
for i in range(1,32):
    for j in range(1,32):
        for k in range(1,32): 
            if i*2 + j*2 + k*2 + i*j + j*k + k*i <= n:
                li[i*2 + j*2 + k*2 + i*j + j*k + k*i-1] += 1
for i in range(n):
    print(li[i])

Fixed code:
n = int(input())
li = [0]*n
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100): 
            if i**2 + j**2 + k**2 + i*j + j*k + k*i <= n:
                li[i**2 + j**2 + k**2 + i*j + j*k + k*i -1] += 1
for i in range(n):
    print(li[i])
Buggy code:
n = 10**4
ans = [0]*10**4
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            a = (x+y+z)**2 -(x*y+y*z+z*x)
            if a <= N:
                ans[a-1] += 1
for i in range(int(input())):
    print(ans[i])

Fixed code:
n = 10**4
ans = [0]*10**4
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = (x+y+z)**2 -(x*y+y*z+z*x)
            if a <= n:
                ans[a-1] += 1
for i in range(int(input())):
    print(ans[i])
Buggy code:
N = int(open(0).read())
cache = {}
cnt = 0
c = int(N ** 0.5)
cs = range(1, c)
for x in cs:
    for y in cs:
        for z in cs:
            n = x*x + y*y + z*z + x*y + y*z + z*x
            if n in cache:
                cache[n] += 1
            else:
                cache[n] = 1
print(cache)
for i in range(1, N+1):
    if i in cache:
        print(cache[i])
    else:
        print(0)


Fixed code:
N = int(open(0).read())
cache = {}
cnt = 0
c = int(N ** 0.5)
cs = range(1, c)
for x in cs:
    for y in cs:
        for z in cs:
            n = x*x + y*y + z*z + x*y + y*z + z*x
            if n in cache:
                cache[n] += 1
            else:
                cache[n] = 1
for i in range(1, N+1):
    if i in cache:
        print(cache[i])
    else:
        print(0)
Buggy code:
from collections import Counter
n=int(input())
cnt=0
ans=[]
for i in range(2,int((2*n)**0.5)+1):
    for j in range(2,int((2*n)**0.5)+1):
        for k in range(2,int((2*n)**0.5)+1):
            if (i*i + j*j + k*k)%2==0 and (i*i + j*j + k*k)<=2*n and (i+j-k>1) and (i+k-j>1) and (k+j-i>1):
                ans.append((i*i + j*j + k*k)//2)
ans.sort()
A=Counter(ans)
for i in range(n):
    print(A[i])

Fixed code:
from collections import Counter
n=int(input())
cnt=0
ans=[]
for i in range(2,int((2*n)**0.5)+1):
    for j in range(2,int((2*n)**0.5)+1):
        for k in range(2,int((2*n)**0.5)+1):
            if (i*i + j*j + k*k)%2==0 and (i*i + j*j + k*k)<=2*n and (i+j-k>1) and (i+k-j>1) and (k+j-i>1):
                ans.append((i*i + j*j + k*k)//2)
ans.sort()
A=Counter(ans)
for i in range(1,n+1):
    print(A[i])
Buggy code:
import numpy as np
n = int(input())
res = [0]*(n+1)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            x = i*i + j*j + k*k + i*j + j*k + k*i
            if x <= n:
                res[x] += 1
for i in range(1,n):
    print(res[i])


Fixed code:
import numpy as np
n = int(input())
res = [0]*(n+1)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            x = i*i + j*j + k*k + i*j + j*k + k*i
            if x <= n:
                res[x] += 1
for i in range(1,n+1):
    print(res[i])
Buggy code:
import math
n = int(input())
mylist = [int(math.sqrt(i)) for i in range(1,n+1)]
print(mylist)

def main():
    for N in range(1,n+1):
        result = 0
        for x in range(1,mylist[N-1]+1):
            tempx = x**2
            for y in range(x, mylist[N-x**2]+1, 2):
                tempy = y**2
                tempxy = x*y
                if N-tempx-tempy-tempxy < 0:
                    break
                else:
                    if mylist[N-tempx-tempy-tempxy]**2 != N-tempx-tempy-tempxy:
                        pass
                    else:
                        z = mylist[N-tempx-tempy-tempxy]-(x+y)//2
                        if z < y:
                            break
                        elif x != y and y != z:
                            result += 6
                        elif x == y and y == z:
                            result += 1
                        else:
                            result += 3
        print(result)
main()

Fixed code:
import math
n = int(input())
mylist = [int(math.sqrt(i)) for i in range(1,n+1)]
mylist = [0]+mylist

def main():
    for N in range(1,n+1):
        result = 0
        for x in range(1,mylist[N//3]+1):
            tempx = x**2
            for y in range(x, mylist[(N-x**2)//2]+1):
                tempy = y**2
                tempxy = x*y
                tempxandy = (x+y)/2
                tempnum = N-tempx-tempy-tempxy+tempxandy**2
                if tempnum <= 0:
                    break
                else:
                    if math.sqrt(tempnum)*2 == int(math.sqrt(tempnum)*2):
                        z = math.sqrt(tempnum)-tempxandy
                        #print(x,y,z,N)
                        if z < y:
                            break
                        elif x != y and y != z:
                            result += 6
                        elif x == y and y == z:
                            result += 1
                        else:
                            result += 3
        print(result)
main()
Buggy code:
N=int(input())
ans=[0]*(N+5)
for i in range(100) :
    for j in range(100) :
        for k in range(100) :
            n=i*i+j*j+k*k+i*j+j*k+k*i
            if N>=n :
                ans[n]+=1

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


Fixed code:
N=int(input())
ans=[0]*(N+5)
for i in range(1,100) :
    for j in range(1,100) :
        for k in range(1,100) :
            n=i*i+j*j+k*k+i*j+j*k+k*i
            if N>=n :
                ans[n]+=1

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

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            value = x*x + y*y + z*z + x*y + y*z + z*x
            if value <= n:
                cnt[value] += 1

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

Fixed code:
n = int(input())
cnt = [0]*11000

for x in range(1,101):
    for y in range(1, 101):
        for z in range(1, 101):
            value = x*x + y*y + z*z + x*y + y*z + z*x
            if value <= n:
                cnt[value] += 1

for i in range(1, n+1):
    print(cnt[i])
Buggy code:
import collections
import sys
input = sys.stdin.readline

n= int(input())
# ans = [0]*n
tmp = []

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):
            tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
cnt = collections.Counter(tmp)

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

Fixed code:
import collections
import sys
input = sys.stdin.readline

n= int(input())
# ans = [0]*n
tmp = []

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):
            tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
cnt = collections.Counter(tmp)

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

ans = [0 for _ in range(n+1)]

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):
            a = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if a <= n:
                ans[a] += 1

for i in ans:
    print(i)



Fixed code:
n = int(input())

ans = [0 for _ in range(n+1)]

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):
            a = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if a <= n:
                ans[a] += 1

for i in range(1,n+1):
    print(ans[i])
Buggy code:
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n+1)]
    for i in range(n//2):
        p=(i+1)**2
        if p>n:
            for j in range(i**2,n+1):
                A[j]=i
            break
        else:
            for j in range(i**2,p):
                A[j]=i
    return A
A=sq(N)
for n in range(1,N+1):
    c=0
    for x in range(1,A[n]):
        p=n-x**2
        if p<0:
            break
        else:
            for y in range(1,A[p]):
                q=n-x**2-y**2-x*y
                if q<0:
                    break
                else:
                    for z in range(1,A[q]):
                        if n==x**2+y**2+z**2+x*y+y*z+z*x:
                            c=c+1
    print(c)


Fixed code:
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n+1)]
    for i in range(n//2):
        p=(i+1)**2
        if p>n:
            for j in range(i**2,n+1):
                A[j]=i
            break
        else:
            for j in range(i**2,p):
                A[j]=i
    return A
A=sq(N)
a=A[N]
L=[0 for j in range(N+1)]
for x in range(1,a+1):
    for y in range(1,a+1):
        for z in range(1,a+1):
            p=x**2+y**2+z**2+x*y+y*z+z*x
            if p<=N:
                L[p]=L[p]+1
            else:
                break
for i in range(1,N+1):
    print(L[i])
Buggy code:
def main():
    N = int(input())

    f = [0] * (N+1)

    for x in range(1, 41):
        for y in range(x, 42):
            for z in range(y, 42):
                if (ans := (x+y+z)**2 - x*y - y*z - z*x) in range(1, N+1):
                    count = 0
                    if x == y and y == z:
                        count = 1
                    elif x != y and y != z and z != x:
                        count = 6
                    else:
                        count = 3
                    f[ans] += count
    
    for i in range(1, N+1):
        print(i, f[i])




def input_ints():
    line_list = input().split()

    if len(line_list) == 1:
        return int(line_list[0])
    else:
        return map(int, line_list)


def input_int_list_in_line():
    return list(map(int, input().split()))


def input_int_tuple_list(n: int):
    return [tuple(map(int, input().split())) for _ in range(n)]


main()


Fixed code:
def main():
    N = int(input())

    f = [0] * (N+1)

    for x in range(1, 100):
        for y in range(x, 100):
            for z in range(y, 100):
                if (ans := (x+y+z)**2 - x*y - y*z - z*x) in range(1, N+1):
                    count = 0
                    if x == y and y == z:
                        count = 1
                    elif x != y and y != z and z != x:
                        count = 6
                    else:
                        count = 3
                    f[ans] += count
    
    for i in range(1, N+1):
        print(f[i])




def input_ints():
    line_list = input().split()

    if len(line_list) == 1:
        return int(line_list[0])
    else:
        return map(int, line_list)


def input_int_list_in_line():
    return list(map(int, input().split()))


def input_int_tuple_list(n: int):
    return [tuple(map(int, input().split())) for _ in range(n)]


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

Fixed code:
N = int(input())
ans = [0]*N
if N > 3:
    n = int((N-3)**(0.5))+1
    nums = [i for i in range(1, n)]
    for x in range(1, n):
        for y in range(1, n):
            for z in range(1, n):
                i = x**2+y**2+z**2+x*y+x*z+y*z
                if i > N:
                    break
                else:
                    ans[i-1] += 1
for a in ans:
    print(a)
Buggy code:
N = int(input())

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

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a < 10050:
                ans[a] += 1
for i in range(1,N):
    print(ans[i])


Fixed code:
N = int(input())

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

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a < 10050:
                ans[a] += 1
for i in range(1,N+1):
    print(ans[i])
Buggy 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):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if N >= tmp:
                ans[tmp] += 1

for i in range(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):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if N >= tmp:
                ans[tmp] += 1

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

n = int(input())
ans_d = {i: 0 for i in range(1,60000)}

p = itertools.product(range(1, 100), range(1, 100), range(1, 100))

for x, y, z in p:
    cnt = (x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (x * z)
    ans_d[cnt] += 1

for i, j in ans_d.items():
    print(i,j)
    if i == n:
        break

Fixed code:
import itertools

n = int(input())
ans_d = {i: 0 for i in range(1,10001)}

p = itertools.product(range(1, 100), range(1, 100), range(1, 100))

for x, y, z in p:
    cnt = (x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (x * z)
    if cnt <= 10000:
        ans_d[cnt] += 1

for i, j in ans_d.items():
    print(j)
    if i == n:
        break
Buggy code:
import sys
def I(): return int(sys.stdin.readline().rstrip())

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

def Main():
    n = I()
    c = [0]*n
    fa = True
    for i in range(1,n+1):
        if n<f(i,i,i):  break
        for j in range(1,n+1):
            if n<f(i,j,j):  break
            for k in range(1,n+1):
                tmp = f(i,j,k)
                if n<tmp:   break
                c[tmp-1] += 1

    for rep in c:
        print(rep)
    return

if __name__=='__main__':
    Main()

Fixed code:
import sys
def I(): return int(sys.stdin.readline().rstrip())

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

def Main():
    n = I()
    c = [0]*n
    fa = True
    for i in range(1,n+1):
        if n<f(i,1,1):  break
        for j in range(1,n+1):
            if n<f(i,j,1):  break
            for k in range(1,n+1):
                tmp = f(i,j,k)
                if n<tmp:   break
                c[tmp-1] += 1

    for rep in c:
        print(rep)
    return

if __name__=='__main__':
    Main()
Buggy code:
from collections import defaultdict

N = int(input())


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

res = defaultdict(int)

for x in range(1, 50):
  for y in range(1, 50):
    for z in range(1, 50):
      dict[fun(x, y, z)] += 1
        
for n in range(1, N):
  print(dict[n])

 

Fixed code:
from collections import defaultdict

N = int(input())


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

res = defaultdict(int)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      res[fun(x, y, z)] += 1
        
for n in range(1, N+1):
  print(res[n])