Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0]*(n+1)
for n in range(1, n+1):
    for i in range(1, 102):
        for j in range(1, 102):
            for k in range(1, 102):
                if n == (i*i + j*j + k*k + i*j + j*k + i*k):
                    a[n]+=1
for x in a[1:]:
    print(x)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
for x in a[1:]:
    print(x)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0]*(n+1)
for n in range(1, n+1):
    for i in range(1, 102):
        for j in range(1, 102):
            for k in range(1, 102):
                if n == (i*i + j*j + k*k + i*j + j*k + i*k):
                    a[n]+=1
for x in a[1:]:
    print(x)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
for x in a[1:]:
    print(x)

Buggy python submission (verdict: Time Limit Exceeded):
import math
for n in range(1, int(input())+1):
    b=0
    a=[0]*103
    l=int(math.sqrt(n)) + 1
    for i in range(1, l + 1):
        if a[i]: continue
        for j in range(1, l + 1):
            if a[j]: continue
            # we know z at this point
            d = i + j
            c = n - i**2 - j**2 - i*j
            try:
                k = int(math.sqrt(d**2 + 4*c) - d - 1)
                if k < 1: continue
                if n == (i**2 + j**2 + k**2 + i*j + j*k + i*k):
                    a[i] = True
                    a[j] = True
                    a[k] = True
                    if i == j and i == k and j == k:
                        b+= 1
                    elif i != j and i != k and j !=k:
                        b+=6
                    else:
                        b+=3
            except:
                pass
    print(b)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
for x in a[1:]:
    print(x)

Buggy python submission (verdict: Time Limit Exceeded):
import math
for n in range(1, int(input())+1):
    b=0
    a=[0]*(n+2)
    for i in range(1, n+1):
        if a[i]: continue
        for j in range(1, n+1):
            if a[j]: continue
            # we know z at this point
            d = i + j
            c = n - i**2 - j**2 - i*j
            try:
                k = int(math.sqrt(d**2 + 4*c) - d - 1)
                if k < 1: continue
                if n == (i**2 + j**2 + k**2 + i*j + j*k + i*k):
                    a[i] = True
                    a[j] = True
                    a[k] = True
                    if i == j and i == k and j == k:
                        b+= 1
                    elif i != j and i != k and j !=k:
                        b+=6
                    else:
                        b+=3
            except:
                pass
    print(b)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
for x in a[1:]:
    print(x)

Buggy python submission (verdict: Time Limit Exceeded):
for n in range(1, int(input())+1):
 b=0
 for i in range(1, n+2):
  for j in range(1, n+2):
   for k in range(1, n+2):
    if n == (i**2 + j**2 + k**2 + i*j + j*k + i*k):
     b+=1
 print(b)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
for x in a[1:]:
    print(x)