Problem:


Score : 300 points

Problem Statement

Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:

1 \leq x,y,z

x^2 + y^2 + z^2 + xy + yz + zx = n

Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

Constraints

All values in input are integers.

1 \leq N \leq 10^4

Input

Input is given from Standard Input in the following format:

N

Output

Print N lines. The i-th line should contain the value f(i).

Sample Input 1

20

Sample Output 1

0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

For n=6, only (1,1,1) satisfies both of the conditions. Thus, f(6) = 1.

For n=11, three triples, (1,1,2), (1,2,1), and (2,1,1), satisfy both of the conditions. Thus, f(6) = 3.

For n=17, three triples, (1,2,2), (2,1,2), and (2,2,1), satisfy both of the conditions. Thus, f(17) = 3.

For n=18, three triples, (1,1,3), (1,3,1), and (3,1,1), satisfy both of the conditions. Thus, f(18) = 3.



Sample input:
20


Sample output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0]*n
n1 = int(n/6)+1

for l in range(1,n+1):
  for i in range(1,n1):
    for j in range(1,n1):
      for k in range(1,n1):
        if i**2 + j**2 + k**2 + i*j + j*k + k*i == l:
          ans[(l-1)] += 1
        elif i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
          break 
    if i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
      break 
  if i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
    break 

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

Submission status: Runtime Error

Solution code:
# cook your dish here
N=int(input())
count=0
xyz=list(range(111,1000))
for i in range(0,N):
    for j in range(0,len(xyz)):
        
        element=xyz[i]
        str_ele=str(element)
        list_ele=list(str_ele)
        x=int(list_ele[0])
        y=int(list_ele[1])
        z=int(list_ele[2])
        Expression=int(x**2+y**2+z**2+x*y+y*z+z*x)
        if(Expression == N):
            count+=1
            print(count)
        else:
            print("0")

Submission status: Runtime Error

Solution code:
N=int(input())
count=0
for i in range(0,N):
    for j in range(0,len(xyz)):
        xyz=list(range(111,999))
        element=xyz[i]
        str_ele=str(element)
        list_ele=list(str_ele)
        x=int(list_ele[0])
        y=int(list_ele[1])
        z=int(list_ele[2])
        Expression=int(x**2+y**2+z**2+x*y+y*z+z*x)
        if(Expression == N):
            count+=1
            print(count)
        else:
            print("0")

Submission status: Runtime Error

Solution code:
N=int(input())
count=0
for i in range(0,N):
 
    xyz=list(range(111,999))
    element=xyz[i]
    str_ele=str(element)
    list_ele=list(str_ele)
    x=int(list_ele[0])
    y=int(list_ele[1])
    z=int(list_ele[2])
    Expression=int(x**2+y**2+z**2+x*y+y*z+z*x)
    if(Expression == N):
        count+=1
        print(count)
    else:
        print("0")

Submission status: Runtime Error

Solution code:
N=int(input())
count=0
for i in range(0,N):
 
    xyz=list(range(111,999))
    element=xyz[i]
    str_ele=str(element)
    list_ele=list(str_ele)
    x=int(list_ele[0])
    y=int(list_ele[1])
    z=int(list_ele[2])
    Expression=int(x**2+y**2+z**2+x*y+y*z+z*x)
    if(Expression == N):
        count+=1
        print(count)
    else:
        print("0")

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
N = int(input())
X = str(input())

V = [1]*200000
for i in range (2, 200001):
	a = i
	b = str(bin(i))
	C = 0
	for j in range (0, len(b)):
		if b[j] == '1':
			C+=1
	d = a%C
	if d ==0:
		V[i-1] = 1
	else:
		V[i-1] = V[d-1]+1

c = 0
for i in range (0, len(X)):
	if X[i] == '1':
		c+=1
length = len(X)

binaryA = []
for i in range (0, length):
    binaryA.append(2**i)

for i in range (0, length):
    e = c
    if X[i] == '0':
        e+=1
    else:
        e-=1
    a = int(X, base = 2)^binaryA[length-1-i]
    if a == 0:
        print(0)
    d = a%e
    if d ==0:
        print(1)
    else:
        print(V[d-1]+1)

Submission status: Runtime Error

Solution code:
n = input()
count = 0
for i in range(1, n):
    j = int(math.sqrt(i))
    for x in range(1, j):
        for y in range(1, j):
            for z in range(1, j):
                if x * x + y * y + z * z + x * y + x * z + y * z == i:
                    count += 1
    print(count)
    count = 0    count = 0
    for i in range(1,n):
        j = int(math.sqrt(i))
        for x in range(1,j):
            for y in range(1,j):
                for z in range(1,j):
                    if x*x+y*y+z*z+x*y+x*z+y*z == i:
                        count += 1
        print(count)
        count = 0

Submission status: Runtime Error

Solution code:

N = int(input())
#N,K,d= map(int,input().split())
#A = list(map(int,input().split()))
#S = str(input())
#T = str(input())

num=np.zeros(10**4+1)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if ans < 10**4+1:
                num[ans]+=1


for i in range(N):
    print(int(num[i+1]))

Submission status: Runtime Error

Solution code:
N = int(input())

ans=[0]*(N+1)
t=int(N**0.5+1)
for x in range(1, t):
    for y in range(1, t):
        for z in range(1, t):
            v=x*x+y*y+z*z+x*y+y*z+z*x
            if v<=N+1: ans[v]+=1
for i in range(1,N+1):
    print(ans[i])

Submission status: Runtime Error

Solution code:
n = int(input())

table = [0] * 1001

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            k = (x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)
            if k < 1001:
                table[k] += 1

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

Submission status: Runtime Error

Solution code:
N=int(input())
ans=[0 for a in range(1000)]
for i in range(1,101):
  for x in range(1,101):
    for y in range(1,101):
      v=x*x+y*y+i*i+x*y+y*i+i*x
      if v<=N:
        ans[v]+=1
for b in range(1,N+1):
  print(ans[b])

Submission status: Runtime Error

Solution code:
N=int(input())
ans=[0 for a in range(100)]
for i in range(1,101):
  for x in range(1,101):
    for y in range(1,101):
      v=x*x+y*y+i*i+x*y+y*i+i*x
      if v<=N:
        ans[v]+=1
for b in range(1,N+1):
  print(ans[b])

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0] * 10000
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+j*k+k*i
      if v<10050:
        ans[v]+=1
for i in range(n):
  print(ans[i+1])

Submission status: Runtime Error

Solution code:
j=10501
l=[0 for i in range(j)]
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      if(v<j):
        l[v]+=1
for i in range(n+1):
  print(l[i+1])

Submission status: Runtime Error

Solution code:
j=10501
l=[0 for i in range(j)]
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      if(v<j):
        l[v]+=1
for i in range(n+1):
  print(l[i+1]

Submission status: Runtime Error

Solution code:
j=10201
l=[0 for i in range(x)]
for x in range(101):
  for y in range(101):
    for z in range(101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      if(v<j):
      	l[v]+=1
for i in range(n+1):
  print(l[i+1]

Submission status: Runtime Error

Solution code:
n=int(input())
j=10201
l=[0 for i in range(x)]
for x in range(101):
  for y in range(101):
    for z in range(101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      l[v]+=1
for i in range(n+1):
  print(l[i+1]

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq]+=1

    for i in ans:
        print(i)    

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
arr = [0]*(N)
lim = int(N**0.5 + 1)
for i in range(1,lim):
    for j in range(1,lim):
        for k in range(1,lim):
            num = i**2 + j**2 + k**2 + i*j + j*k + k*i - 1
            if num <= N:
                arr[num] += 1

print(*arr, sep='\n')

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0 for x in range(10000)]

for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            v = i*i + j*j + k*k + i*j + i*k + j*k
            if v < 10000:
                ans[v] += 1
for i in range(n):
    print(ans[i+1])

Submission status: Runtime Error

Solution code:
N = int(input())
ct = 0
L = list()


def kansu(i):
    if i >= 100:
        L.append(ct)
        ct -= ct
    else:
        for x in range(1, i):
            for y in range(1, i):
                for z in range(1, i):
                    if i == x**2+y**2+z**2+x*y+y*z+z*x:
                        global ct
                        ct += 1
        L.append(ct)
        ct -= ct

for i in range(1, N+1):
    kansu(i)
[print(j) for j in L]

Submission status: Runtime Error

Solution code:
n = int(input())

f = [0] * 1001

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 <= 1000:
                f[s] += 1

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

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0 for _ in range(10000)]
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+j*k+k*i;
            if v < 10000:
                ans[v] += 1
for i in range(n):
    print(ans[i+1])

Submission status: Runtime Error

Solution code:
from collections import defaultdict
N = int(input())
d = defaultdict(int)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n = x*x+y*y+z*z+x*y+y*z+z*x
                d[n]+=1
for i in range(1,N+1):
    print(d[i])

Submission status: Runtime Error

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

    
    for n in range(1, N + 1):

        max_itr = min(101, int(math.sqrt(n)) + 1)
                
        
        ans = 0

        for x in range(1, max_itr):
            for y in range(1, max_itr):
                for z in range(1, max_itr):

                    # left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    left_eq=x**2+y**2+z**2+x*y+y*z+z*x
                    if (left_eq == n):
                        ans += 1
        
        
        print(ans)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

ans = [0 for _ in range(10**4)]

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
           v = (i+j+k)**2 - (i*j + j*k + k*i)
           if v < 10**4:
            ans[v] += 1

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

Submission status: Runtime Error

Solution code:
MAX = 2*10**5
def popcount(x):
    '''xの立っているビット数をカウントする関数
    (xは64bit整数)'''

    # 2bitごとの組に分け、立っているビット数を2bitで表現する
    x = x - ((x >> 1) & 0x5555555555555555)

    # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)

    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f # 8bitごと
    x = x + (x >> 8) # 16bitごと
    x = x + (x >> 16) # 32bitごと
    x = x + (x >> 32) # 64bitごと = 全部の合計
    return x & 0x0000007f
s_map = [0 for i in range(MAX+1)]
def solve(n):
    if n == 0:
        return 1
    if s_map[n] > 0:
        return s_map[n]
    s_map[n] = 1 + solve(n % popcount(n))
    return s_map[n]

N = int(input())
X = input()
num_x = int(X, 2)
p_cnt = X.count('1')
for i in range(N):
    c_p_cnt = p_cnt+1 if X[i] == '0' else p_cnt-1
    x = num_x + 2**(N-1-i) if X[i] == '0' else num_x - 2**(N-1-i)
    if x == 0:
        print(0)
    else:
        print(solve(x % c_p_cnt))

Submission status: Runtime Error

Solution code:
N = int(input())
lis = [0]*N
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x -1
            if ans > N:
                pass
            else:
                lis[ans] += 1
for i in range(N):
    print(lis[i])

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [0]*(N)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans:
    print(m)

Submission status: Runtime Error

Solution code:
// #include "pch.h"
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <climits>
#include <string>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <ctime>
#include <cassert>
#include <fstream>
#include <stack>
#include <random>

typedef long long ll;
typedef std::pair<int, int> Pii;
typedef std::pair<long long, long long> Pll;
typedef std::pair<double, double> Pdd;

#define rip(i, n, s) for (int i = (s);i < (int)( n ); i++)
#define all(a) a.begin(), a.end()
#define MM << " " <<

template<typename T>
using MaxHeap = std::priority_queue<T>;
template<typename T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template<typename T>
void vdeb(std::vector<T> &da) {
    for (int i = 0;i < da.size();i++) {
        if (i == da.size() - 1) std::cout << da[i];
        else std::cout << da[i] << ' ';
    }
    std::cout << '\n';
}
template<typename T>
void vdeb(std::vector<std::vector<T>> &da) {
    for (int i = 0;i < da.size();i++) {
        std::cout << i << ' ';
        vdeb(da[i]);
    }
    std::cout << '\n';
}

using namespace std;

int main() {
    int n; cin >> n;
    vector<int> ans(n+1);
    rip(i,1000, 1) {
        rip(j, 1000, 1) {
            rip(k, 1000, 1) {
                int now = i*i + j*j + k*k + i*j + j*k + k*i;
                if(now > n) break;
                ans[now]++;
            }
        }
    }
    rip(i,n+1,1) {
        printf("%d\n", ans[i]);
    }
}

Submission status: Runtime Error

Solution code:
import math
def calc(x, y, z):
    return x * x + y * y + z * z + x * y + y * z + z * x

def calc_combination_num(x, y, z):
    if x == y and y == z:
        # 全部同じ数字なら組み合わせの個数は1個
        return 1
    if x == y or y == z:
        # どれか2つが同じ数字なら組み合わせの個数は3C2 = 3個
        return 3
    # 全部違う数字なら組み合わせの個数は3P2 = 6個
    return 6

N = int(input())

result_map = {}
for i in range(1, N):
    result_map[i] = 0

# x <= y <= zとしてループを回し
for x in range(1, N):
    tempFn1 = calc(x, 0, 0)
    if tempFn1 > N:
        # もう数値は増える一方なのでやる必要なし
        break
    for y in range(x, N):
        tempFn2 = calc(x, y, 0)
        if tempFn2 > N:
            # もう数値は増える一方なのでやる必要なし
            break
        for z in range (y, N):
            fn = calc(x, y, z)
            if fn > N:
                # もう数値は増える一方なのでやる必要なし
                break
            # 組み合わせの個数の算出
            combination_num = calc_combination_num(x, y, z)
            result_map[fn] = result_map[fn] + combination_num

for result in result_map.values():
    print(result)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=[0]*104
for i in range(1,102):
    for j in range(1,102):
        for k in range(1,102):
            var=i*i+j*j+k*k+i*j+j*k+k*i
            if var<102:
                ans[var]+=1
for i in range(n):
    print(ans[i+1])

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
  int n;
  cin >> n;
  vector<int> ans(n+1);
  for (int x = 1; x <= 100; x++) {
    for (int y = 1; y <= 100; y++) {
      for (int z = 1; z <= 100; z++) {
        int s = x*x + y*y + z*z;
        s += x*y + y*z + z*x;
        if (s > n) continue;
        ans[s]++;
      }
    }
  }
 
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
import math

N = int(input())

#f(n) を以下の 2 つの条件の両方を満たすような 3 つの整数の組 (x,y,z)の個数とします。
# 1≤x,y,z
# x**2 + y**2 + z**2 + xy + yz + zx = n

# x,y,zの最大値を考える。
# x**2 + 1**2 + 1**2 + x + 1 + x = n
# x**2 + 2x = n - 3
# x**2 + 2x -n + 3 = 0
# x = {-2 ± sqrt(2**2 - 4*1*(-n+3))}/2*1
# x = {-2 ± sqrt(4 + 4n -12)}/2
# 1 ≤ xより
# x = {-2 + sqrt(4n - 8)}/2 = {-2 + 2 * sqrt(n - 2)}/2 = -1 + sqrt(n - 2)
# ∴ 1 ≤ x ≤ math.floor(-1 + sqrt(n - 2))
# y,zも同様。
# N <= 10**4 より、x,y,xで全探索しても(10**2)**3 = 10**6 で間に合う

ans_dict = {i:set() for i in range(1,N+1)}

for i in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
    for j in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
        for k in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
            n = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if 1 <= n <= N:
                ans_dict[n].add((i,j,k))
            
for i in range(1,N+1):
    print(len(ans_dict[i]))

Submission status: Runtime Error

Solution code:
import math

n = int(input())
nums = [int(x+1) for x in range(n)]

cnd = int(math.sqrt(n-3)+1)
 
def cnd_check(ans,cnd,cnt=0):
      for x in range(1,cnd+1):
            for y in range(1,cnd+1):
                  for z in range(1,cnd+1):
                        if x**2+y**2+z**2+x*y+y*z+z*x == ans:
                              cnt += 1
      return cnt
  
for i in range(n):
      print(cnd_check(nums[i],cnd))

Submission status: Runtime Error

Solution code:
import math

n = int(input())
nums = [int(x+1) for x in range(n)]

cnd = int(math.sqrt(n-2)+1)
 
def cnd_check(ans,cnd,cnt=0):
      for x in range(1,cnd+1):
            for y in range(1,cnd+1):
                  for z in range(1,cnd+1):
                        if x**2+y**2+z**2+x*y+y*z+z*x == ans:
                              cnt += 1
      return cnt
  
for i in range(n):
      print(cnd_check(nums[i],cnd))

Submission status: Runtime Error

Solution code:
import math

n = int(input())
nums = [int(x+1) for x in range(n)]

cnd = int(math.sqrt(n-2))
 
def cnd_check(ans,cnd,cnt=0):
      for x in range(1,cnd+1):
            for y in range(1,cnd+1):
                  for z in range(1,cnd+1):
                        if x**2+y**2+z**2+x*y+y*z+z*x == ans:
                              cnt += 1
      return cnt
  
for i in range(n):
      print(cnd_check(nums[i],cnd))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [0] * 10**5
for x in range(1, 101):
	for y in range(1, 101):
    	for z in range(1, 101):
      		a[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1
for i in range(1, n + 1):
	print(a[i])

Submission status: Runtime Error

Solution code:
n=int(input())
ans=[0 for i 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+i*k+j*k
      if v<10050:
        ans[v]+=1
for i in range(n):
  print(a[i+1])

Submission status: Runtime Error

Solution code:
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<int> ans(n+1);
    for (int x = 1; x <= 100; x++)
    {
        for (int y = 1; y <= 100; y++)
        {
            for (int z = 1; z <= 100; z++)
            {
                int m = x * x + y * y + z * z + x * y + y * z + z * x;
                if (m <= n)
                {
                    ans[m]++;
                }
                else
                {
                    break;
                }
            }
        }
    }
    rep(i,n){
        cout << ans[i+1] << "\n";
    }
}

Submission status: Runtime Error

Solution code:
N = int(input())

x,y,z = 1,1,1

def is_true(x,y,z,i):
    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
        return True
    return False

loop = int(N ** (1/2))

for i in range(5):
    print(0)
print(1)

for i in range(7,N+1):
    a = 0
    b = 0
    c = 0
    if i
    for ai in range(loop):
        for bi in range(loop):
            for ci in range(loop):
                X = x+a
                Y = y+b
                Z = z+c
                if is_true(X,Y,Z,i):
                    count += 1
    print(count)

Submission status: Runtime Error

Solution code:
N = int(input())

x,y,z = 1,1,1

def is_true(x,y,z,i):
    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
        return True
    return False

loop = int((N-2) ** (1/2)) - 1
for i in range(1,N+1):
    count = 0

    if i < 6:
        print(count)
        continue
    for a in range(loop):
        for b in range(loop):
            for c in range(loop):
                X = x+a
                Y = y+b
                Z = z+c
                if is_true(X,Y,Z,i):
                    count += 1
    print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
l = [-1]*N
def triplets(n):
  counter = 0
  lower = 1
  upper = round((n-2)**0.5-1)
  for x in range(1, upper+1):
    y_upper = round(0.5*((4*n-3*x**2)**0.5-x))
    for y in range(1, y_upper+1):
      root = (4*n-3*x**2-3*y**2-2*x*y)**0.5
      z = 0.5*(root-x-y)
      if z%1==0 and z>0:
        counter += 1
  return counter
for m in range(1, N+1):
  if l[m-1] == -1:
    tmp = triplets(m)
    l[m-1] = tmp
    if tmp != 0:
      for k in range(2,round((N/m)**0.5)-1):
        l[m*k**2-1] = tmp
for x in l:
  print(x)

Submission status: Runtime Error

Solution code:
N = int(input())
l = [-1]*N
def triplets(n):
  counter = 0
  lower = 1
  upper = round((n-2)**0.5-1)
  for x in range(1, upper+1):
    y_upper = round(0.5*((4*n-3*x**2)**0.5-x))
    for y in range(1, y_upper+1):
      root = (4*n-3*x**2-3*y**2-2*x*y)**0.5
      z = 0.5*(root-x-y)
      if z%1==0 and z>0:
        counter += 1
  return counter
for m in range(1, N+1):
  if l[m-1] == -1:
    tmp = triplets(m)
    l[m-1] = tmp
    if tmp != 0:
      for k in range(2,round((N/m)**0.5)):
        l[m*k**2-1] = tmp
for x in l:
  print(x)

Submission status: Runtime Error

Solution code:
N = int(input())
def triplets(n):
  	counter = 0
    lower = 1
    upper = round(n**0.5)
    for x in range(1, upper+1):
        y_upper = round(0.5*((4*n-3*x**2)**0.5-x))
        for y in range(1, y_upper+1):
            root = (4*n-3*x**2-3*y**2-2*x*y)**0.5
            z = 0.5*(root-x-y)
            if z%1==0 and z>0:
                counter += 1
    return counter
for m in range(1, N+1):
    print(triplets(m))

Submission status: Runtime Error

Solution code:
n = I()
dp = [0] * (500000)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            pe = x**2 + y**2 + z**2 + x*y + y*z + z*x
            dp[pe] += 1
print(*dp[1:n+1],sep='\n')

Submission status: Runtime Error

Solution code:
N = int(input())

cnt = [0] * 6 * 10000 + 1

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

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

Submission status: Runtime Error

Solution code:
N=int(input())

a=[0]*10**4

for x in range(1,100):
     for y in range(1,100):
         for z in range(1,100):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             if n<=10000:
                 a[n-1]+=1

for n in range(1,N+1):
    print(a[n])

Submission status: Runtime Error

Solution code:
N=int(input())

a=[0]*10**4

for x in range(1,(N+1)):
     for y in range(1,(N+1)):
         for z in range(1,(N+1)):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             a[n+1]+=1

for n in range(1,N+1):
    print(a[n])

Submission status: Runtime Error

Solution code:
N=int(input())

a=[0]*10**4

for x in range(1,(N+1)):
     for y in range(1,(N+1)):
         for z in range(1,(N+1)):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             a[n]+=1

for n in range(1+N+1):
    print(a[n])

Submission status: Runtime Error

Solution code:
N=int(input())

a=[0]*10**4
count=0
for x in range(1,(N+1)):
     for y in range(1,(N+1)):
         for z in range(1,(N+1)):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             a[n]+=1

for n in range(1+N+1):
    print(a[n])

Submission status: Runtime Error

Solution code:
N=int(input())

a=[0]*10**4
count=0
for x in range(1,(N+1)):
     for y in range(1,(N+1)):
         for z in range(1,(N+1)):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             a[n]+=1

for n in range(1+N+1):
    print(a[n])

Submission status: Runtime Error

Solution code:
N=int(input())

for n in range(1,N+1):
    count=0
    for x in range(1,(n+1)/3):
        for y in range(1,(n+1)/3):
            for z in range(1,(n+1)/3):
                if (x+y+z)**2-(x*y+y*z+z*x)==n:
                    count=count+1
    print(count)

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0 for i in range(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+j*k+k*i;
			if v<10050:
				ans[v]+=1
                
for i in range(n):
print(ans[i+1])

Submission status: Runtime Error

Solution code:
n = int(input())

cnt = [0] * 1001

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 + i*k
			if(x <= 1000):
				cnt[x]+=1

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

Submission status: Runtime Error

Solution code:
n=int(input())
x=input()

def popcount(n):
    bin_n=bin(n)[2:]
    count=0
    for i in bin_n:
        count+=int(i)
    return count

def f(n):
    ans=0
    while n>0:
        n=n%popcount(n)
        ans+=1
    return ans

for i in range(n):
    inv=str(int(not bool(int(x[i]))))
    i_10=int((x[0:i]+ inv+x[i+1:n]),2)
    print(f(i_10))

Submission status: Runtime Error

Solution code:
N=int(input())
r=[0]*N
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i + j*j + k*k + i*j + i*k + k*j
            if v <= 10000
            r[v-1] += 1
print(*r,sep='\n')

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
n = int(input())
A = [0]*10000
 
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            a = x**2+y**2+z**2+x*y+y*z+z*x
            if a <10000:
                A[a] += 1
                
for i in range(n):
    print(A[i+1])

Submission status: Runtime Error

Solution code:
num_limit = int(input())
for i in range(1,num_limit+1):
    xyz_count = 0
    j_limit = int(i ** 0.5)
    for j in range(1,j_limit+1):
        for k in range(1,j + 1):
            if i <= j**2 + j*2 +3:
                break:
            if i <= j**2 + k**2 + j*k + j + k:
                break
            for l in range(1,k+1):
                if i < j**2 + k**2 + l**2 + j*k + k*l + l*j:
                    break
                elif i == j**2 + k**2 + l**2 + j*k + k*l + l*j:
                    if j > k:
                        if k > l:
                            xyz_count += 6
                        else:
                            xyz_count += 3
                    elif k > l:
                        xyz_count += 3
                    else:
                        xyz_count += 1
    print(xyz_count)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
	ll a[10005]={};
	ll i,j,k;
	for(i=1;i<=105;i++){
		for(j=1;j<=105;j++){
			for(k=1;k<=105;k++){
				ll x = i*i+j*j+k*k+i*j+j*k+k*i;
				if(x<10005){
					a[x]++;
				}
			}
		}
	}
	ll n;
	cin>>n;
	for(i=1;i<=n;i++){
		cout<<a[i]<<endl;
	}
}

Submission status: Runtime Error

Solution 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])

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))


N = int(input())

anss = [0 for i in range(1001)]
for x in range(1, int(math.sqrt(N))):
    for y in range(1, int(math.sqrt(N))):
        for z in range(1, int(math.sqrt(N))):
            tmp = x ** 2 + y ** 2 + z ** 2 + x*y + x*z + y*z
            if tmp <= 1000:
                anss[tmp] += 1 

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

Submission status: Runtime Error

Solution code:
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=9900:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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