Buggy python submission (verdict: Time Limit Exceeded):
import math
def cnt_nCnd(n):
    upper = math.ceil(math.sqrt(n))
    count = 0
    for x in range(1, upper):
        x_double = pow(x,2)
        for y in range(x, upper):
            y_double = pow(y,2)
            for z in range(y, upper):
                if x_double + y_double + pow(z,2) + x*y + y*z + z*x == n:
                    n_uniq = len(set([x, y, z]))
                    if n_uniq == 1:
                        count += 1
                    elif n_uniq == 2:
                        count += 3
                    elif n_uniq == 3:
                        count += 6
    return count


N = int(input())
for n in range(1, N+1):
    print(cnt_nCnd(n))



Fixed submission:
N = int(input())
a = [0]*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:
                a[v-1] += 1
 
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
def cnt_nCnd(n):
    upper = math.ceil(math.sqrt(n))
    count = 0
    for x in range(1, upper):
        x_double = pow(x,2)
        for y in range(x, upper):
            y_double = pow(y,2)
            for z in range(y, upper):
                if x_double + y_double + pow(z,2) + x*y + y*z + z*x == n:
                    n_uniq = len(set([x, y, z]))
                    if n_uniq == 1:
                        count += 1
                    elif n_uniq == 2:
                        count += 3
                    elif n_uniq == 3:
                        count += 6
    return count


N = int(input())
for n in range(1, N+1):
    print(cnt_nCnd(n))



Fixed submission:
N = int(input())
a = [0]*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:
                a[v-1] += 1
 
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
def cnt_nCnd(n):
    upper = math.ceil(math.sqrt(n))
    count = 0
    for x in range(1, upper):
        x_double = x**2
        for y in range(x, upper):
            y_double = y**2
            for z in range(y, upper):
                if x_double + y_double + z**2 + x*y + y*z + z*x == n:
                    n_uniq = len(set([x, y, z]))
                    if n_uniq == 1:
                        count += 1
                    elif n_uniq == 2:
                        count += 3
                    elif n_uniq == 3:
                        count += 6
    return count


N = int(input())
for n in range(1, N+1):
    print(cnt_nCnd(n))

Fixed submission:
N = int(input())
a = [0]*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:
                a[v-1] += 1
 
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
def cnt_nCnd(n):
    upper = math.ceil(math.sqrt(n))
    count = 0
    for x in range(1, upper):
        for y in range(x, upper):
            for z in range(y, upper):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    if len(set([x, y ,z])) == 1:
                        count += 1
                    elif len(set([x, y ,z])) == 2:
                        count += 3
                    elif len(set([x, y ,z])) == 3:
                        count += 6
    return count


N = int(input())
for n in range(1, N+1):
    print(cnt_nCnd(n))

Fixed submission:
N = int(input())
a = [0]*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:
                a[v-1] += 1
 
for i in range(N):
    print(a[i])