Buggy python submission (verdict: Time Limit Exceeded):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

def solv_quadratic_equation(a, b, c):
    """ 2次方程式を解く  """
    D = (b**2 - 4*a*c)
    
    if D<0:
        return None,None
    D = D ** (1/2)
    x_1 = (-b + D) / (2 * a)
    x_2 = (-b - D) / (2 * a)

    return x_1, x_2

N=one_int()

def solve(n):
    ret = []
    X=int(n**(1/2) +0.5)+1
    Y=int(n**(1/2) +0.5)+1 
    Z=int(n**(1/2) +0.5)+1
    for x in range(1,X):
        for y in range(1,Y):
            ans1, ans2 = solv_quadratic_equation(1, y+x, x**2 + y**2 + x*y -n)
            if ans1 is None:
                continue
                
            if ans1>0:
                z=int(ans1+0.5)
                if (x**2 + y**2 + z**2 + y*z + x*y + z*x)==n:
                    ret.append((x,y,z))
            if ans2>0:
                z=int(ans2+0.5)
                if (x**2 + y**2 + z**2 + y*z + x*y + z*x)==n:
                    ret.append((x,y,z))
#             ret.append((x,y,ans2))
            
#             for z in range(1,Z):
#                 if (x**2 + y**2 + z**2 + y*z + x*y + z*x)==n:
#                     ret.append((x,y,z))
    return len(set(ret))

for i in range(1,N+1):
    print(solve(i))

Fixed submission:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()

def solve(n):
    ret = {i:[] for i in range(n+1)}
    X=int(n**(1/2) +0.5)+1
    Y=int(n**(1/2) +0.5)+1 
    Z=int(n**(1/2) +0.5)+1
    for x in range(1,X):
        for y in range(1,Y):
            d = x**2+y**2+x*y
            for z in range(1,Z):
                if n < d+z**2 + y*z + z*x:
                    continue
                ret[d+z**2 + y*z + z*x].append((x,y,z))
    return ret

ret = solve(N)
for i in range(1,N+1):
    print(len(set(ret[i])))

Buggy python submission (verdict: Time Limit Exceeded):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

def solv_quadratic_equation(a, b, c):
    """ 2次方程式を解く  """
    D = (b**2 - 4*a*c)
    
    if D<0:
        return None,None
    D = D ** (1/2)
    x_1 = (-b + D) / (2 * a)
    x_2 = (-b - D) / (2 * a)

    return x_1, x_2

N=one_int()

def solve(n):
    ret = []
    X=int(n**(1/2) +0.5)+1
    Y=int(n**(1/2) +0.5)+1 
    Z=int(n**(1/2) +0.5)+1
    for x in range(1,X):
        for y in range(1,Y):
#             ans1, ans2 = solv_quadratic_equation(1, y+x, x**2 + y**2 + x*y -n)
#             if ans1 is None:
#                 continue
            for z in range(1,Z):
                if (x**2 + y**2 + z**2 + y*z + x*y + z*x)==n:
                    ret.append((x,y,z))
    return len(set(ret))

for i in range(1,N+1):
    print(solve(i))

Fixed submission:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()

def solve(n):
    ret = {i:[] for i in range(n+1)}
    X=int(n**(1/2) +0.5)+1
    Y=int(n**(1/2) +0.5)+1 
    Z=int(n**(1/2) +0.5)+1
    for x in range(1,X):
        for y in range(1,Y):
            d = x**2+y**2+x*y
            for z in range(1,Z):
                if n < d+z**2 + y*z + z*x:
                    continue
                ret[d+z**2 + y*z + z*x].append((x,y,z))
    return ret

ret = solve(N)
for i in range(1,N+1):
    print(len(set(ret[i])))