Buggy python submission (verdict: Time Limit Exceeded):
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = list(np.array([0.5*( (x+y)*(x+y) + (y+z)*(y+z) + (z+x)*(z+x) )]*len(list_num)) - np.array(list_num))
                
                for i in range(1, num+1):
                    if function[i-1] == 0:
                        count[i-1] = count[i-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()


Fixed submission:
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()

Buggy python submission (verdict: Time Limit Exceeded):
import math

def  XYZTriplets():

    num = int(input())
    
    for i in range(1, num+1):
        count = 0

        x = 1
        y = 1
        z = 1

        for x in range(1, 105):
            for y in range(1, 105):
                for z in range(1, 105):
            
                    function = 0.5*( (x+y)*(x+y) + (y+z)*(y+z) + (z+x)*(z+x) ) - i
                                
                    if function == 0:
                        count = count + 1
                        
                    
        print(count)
        

if __name__ == '__main__':
    XYZTriplets()


Fixed submission:
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()

Buggy python submission (verdict: Time Limit Exceeded):
import math

def  XYZTriplets():

    num = int(input())
    
    for i in range(1, num+1):
        count = 0

        x = 1
        y = 1
        z = 1

        for x in range(1, int(math.sqrt(num))):
            for y in range(1, int(math.sqrt(num))):
                for z in range(1, int(math.sqrt(num))):
            
                    function = 0.5*( (x+y)*(x+y) + (y+z)*(y+z) + (z+x)*(z+x) ) - i
                                
                    if function == 0:
                        count = count + 1
                        
                    
        print(count)
        

if __name__ == '__main__':
    XYZTriplets()


Fixed submission:
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()

Buggy python submission (verdict: Time Limit Exceeded):
import math

def  XYZTriplets():

    num = int(input())
    
    for i in range(1, num+1):
        count = 0

        x = 1
        y = 1
        z = 1

        for x in range(1, int(math.sqrt(num))+1):
            for y in range(1, int(math.sqrt(num))+1):
                for z in range(1, int(math.sqrt(num))+1):
            
                    function = 0.5*( (x+y)*(x+y) + (y+z)*(y+z) + (z+x)*(z+x) ) - i
                                
                    if function == 0:
                        count = count + 1
                        
                    
        print(count)
        




if __name__ == '__main__':
    XYZTriplets()


Fixed submission:
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()

Buggy python submission (verdict: Time Limit Exceeded):
def  XYZTriplets():

    num = int(input())
    
    for i in range(num):
        count = 0

        x = 1
        y = 1
        z = 1

        flag = True
        
        while flag == True:
            
            function = 0.5*( (x+y)*(x+y) + (y+z)*(y+z) + (z+x)*(z+x) ) - i
                        
            if function == 0:
                if x == y and y == z and z == x:
                    count = count + 1
                
                else:
                    count = count + 3
            
                list_xyz = [x, y, z]
            
                if list_xyz.index(max(list_xyz)) == 0:
                    x = x + 1
                elif list_xyz.index(max(list_xyz)) == 1:
                    y = y + 1
                else:
                    z = z + 1
            
            if function > 0:
                print(count)
        
                break



if __name__ == '__main__':
    XYZTriplets()


Fixed submission:
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()