Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

n, k = map(int, input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
a_bin = list(map(bin, a))

bin_digit = [0]*50
for ai in a:
    i = 0
    # print(bin(ai))
    while ai>0:
        bin_digit[i] += int(bin(ai)[-1])
        i += 1
        ai = ai>>1
# print(bin_digit)

length_k = len(bin(k))-2
x_k = [0]*length_k
for i in range(length_k):
    if bin_digit[i]>=n-bin_digit[i]:
        x_k[i] = 0
    else:
        x_k[i] = 1

# print('x_k',x_k)
# print('x_k=',sum(x_k[i]*2**i for i in range(len(x_k))))

bin_k = bin(k)[-1:1:-1]
for i in range(length_k-1,-1,-1):
    if x_k[i]>int(bin_k[i]):
        x_k[i] = 1-x_k[i]
    elif x_k[i]<int(bin_k[i]):
        break

x = sum(x_k[i]*2**i for i in range(len(x_k)))
# print('x=',x)
ans = sum(x^ae for ae in a)
print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int,input().split()))

bin_digit = [0]*50
for ai in a:
    i = 0
    bin_ai = bin(ai)
    for i in range(len(bin_ai)-2):
        if bin_ai[-1-i] == '1':
            bin_digit[i] += 1
        i += 1

bin_k = list(map(int, bin(k)[-1:1:-1]))
length_k = len(bin_k)
x_k = [None]*length_k
for i in range(length_k):
    if 2*bin_digit[i]>=n:
        x_k[i] = 0
    else:
        x_k[i] = 1

for i in range(length_k-1,-1,-1):
    if x_k[i]>bin_k[i]:
        x_k[i] = 1-x_k[i]
    elif x_k[i]<bin_k[i]:
        break

x = sum(x_k[i]*2**i for i in range(len(x_k)))
ans = sum(x^ae for ae in a)
print(ans)
### BUGGY CODE ###

S = input()
S = S[::-1]
ans = [[0] * 13 for _ in range(len(S))]
MOD = 10 ** 9 + 7
if S[0] == "?":
    for i in range(10):
        ans[0][i] = 1
else:
    ans[0][int(S[0])] = 1

for i, s in enumerate(S):
    base = 10 ** i
    if i == 0:
        continue
    if s == "?":
        for n in range(10):
            for j in range(13):
                ans[i][(j + n * base) % 13] += ans[i - 1][j]
                ans[i][(j + n * base) % 13] %= MOD
    else:
        for j in range(13):
            ans[i][(j + int(s) * base) % 13] = ans[i - 1][j]

print(ans[-1][5])


### FIXED CODE ###

S = input()
ans = [[0] * 13 for _ in range(len(S))]
MOD = 10 ** 9 + 7
if S[0] == "?":
    for i in range(10):
        ans[0][i] = 1
else:
    ans[0][int(S[0])] = 1

for i, s in enumerate(S):
    if i == 0:
        continue
    if s == "?":
        for n in range(10):
            for j in range(13):
                ans[i][(j * 10 + n) % 13] += ans[i - 1][j]
                ans[i][(j * 10 + n) % 13] %= MOD
    else:
        for j in range(13):
            ans[i][(j * 10 + int(s)) % 13] = ans[i - 1][j]

print(ans[-1][5])
### BUGGY CODE ###

if __name__ == "__main__":
    N, K = map(int, input().split())
    h = list()
    for i in range(N):
        h.append(int(input()))

    h = sorted(h)

    res = 10 ** 9 + 1
    for i in range(N-K + 1):
        if res > max(h[i:i+K]) - min(h[i:i+K]):
            res = max(h[i:i+K]) - min(h[i:i+K])
    
    print(res)


### FIXED CODE ###

if __name__ == "__main__":
    N, K = map(int, input().split())
    h = list()
    for i in range(N):
        h.append(int(input()))

    h = sorted(h)

    res = 10 ** 9 + 1
    for i in range(N-K+1):
        if res > h[i+K-1] - h[i]:
            res = h[i+K-1] - h[i]
    
    print(res)
### BUGGY CODE ###

N, M = map(int, input().split())
matrix = [[0] * (N+1) for i in range(N+1)]
min_distance = [0] * (N+1)
for i in range(M):
    L, R, C = map(int, input().split())
    for l in range(L,R):
        for r in range(l+1, R+1):
            if matrix[l][r] != 0:
                now = matrix[l][r]
                matrix[l][r] = min(now, C)
            else:
                matrix[l][r] = C
# print(matrix)

for i in range(1, N+1):
    for j in range(1, i):
        if min_distance[i] != 0 and matrix[j][i] != 0 and min_distance[j] != 0:
            min_distance[i] = min(min_distance[j] + matrix[j][i], min_distance[i])
        elif min_distance[i] == 0 and matrix[j][i] != 0 and min_distance[j] > 0:
            min_distance[i] = min_distance[j] + matrix[j][i]
        elif min_distance[i] == 0 and matrix[j][i] != 0 and j == 1:
            min_distance[i] = matrix[j][i]
        # print(i, j, min_distance[j], matrix[j][i], min_distance[i])

if min_distance[-1] == 0:
    print(-1)
else:
    print(min_distance[-1])

### FIXED CODE ###

import heapq
N, M = map(int, input().split())
edge_list = [[] for i in range(N+1)]
for i in range(2, N + 1):
    edge_list[i].append((0, i-1))
for i in range(M):
    L, R, C = map(int, input().split())
    edge_list[L].append((C, R))
def solve(s, t):
    fixed = {}
    q = []
    heapq.heappush(q, (0, s))
    while q:
        w, x = heapq.heappop(q)
        if x == t:
            return w
        if x in fixed:
            continue
        fixed[x] = w
        for c, y in edge_list[x]:
            if y not in fixed:
                heapq.heappush(q, (w + c, y))
    return None

answer = solve(1, N)
if answer is None:
    print(-1)
else:
    print(answer)
### BUGGY CODE ###

def resolve():
    A, B, M = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))

    grid=[list(map(int,input().split())) for i in range(M)]

    totals = []
    for i in a:
        total = [i+j for j in b]   
        totals.append(total)

    res = min(a) + min(b)
    for m in grid:
        if m[0]-1 < A and m[1]-1 < B:
            tmp = totals[m[0]-1][m[1]-1] - m[2]
    
            if tmp < res:
                res = tmp

    print(res)
    
resolve()

### FIXED CODE ###

def resolve():
    A, B, M = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))

    grid=[list(map(int,input().split())) for i in range(M)]

    res = min(a) + min(b)
    for m in grid:
        if m[0]-1 < A and m[1]-1 < B:
            tmp = a[m[0]-1] + b[m[1]-1] - m[2]
        
            if tmp < res:
                res = tmp

    print(res)
    
resolve()
### BUGGY CODE ###

h,w=map(int,input().split())
inf=10**3
d=((-1,0),(1,0),(0,-1),(0,1))
S=[["#"]*(w+2)]
S.extend([["#"]+[s for s in input()]+["#"] for _ in range(h)])
S.append(["#"]*(w+2))
import collections
def dist(a,b):
  if S[a][b]=="#":
    return 0
  else:
    D=[[inf]*(w+2) for _ in range(h+2)]
    D[a][b]=0
    Visit=collections.deque()
    Visit.append(100*a+b)
    while Visit:
      v=Visit.pop()
      va,vb=v//100,v%100
      for dx,dy in d:
        if S[va+dx][vb+dy]=="#":
          continue
        elif D[va+dx][vb+dy]>D[va][vb]+1:
          Visit.append((va+dx)*100+(vb+dy))
          D[va+dx][vb+dy]=D[va][vb]+1
    ret=0
    for i in range(h):
      for j in range(w):
        if D[i+1][j+1]<inf:
          ret=max(ret,D[i+1][j+1])
    return ret
ans=0
for i in range(h):
  for j in range(w):
    ans=max(dist(i+1,j+1),ans)
print(ans)





### FIXED CODE ###

h,w=map(int,input().split())
inf=float("inf")
d=((-1,0),(1,0),(0,-1),(0,1))
S=[["#"]*(w+2)]
S.extend([["#"]+[s for s in input()]+["#"] for _ in range(h)])
S.append(["#"]*(w+2))

def dist(a,b):
  if S[a][b]=="#":
    return 0
  else:
    D=[[inf]*(w+2) for _ in range(h+2)]
    D[a][b]=0
    Visit=[100*a+b]
    while Visit:
      v=Visit.pop()
      va,vb=v//100,v%100
      for dx,dy in d:
        if S[va+dx][vb+dy]=="#":
          continue
        elif D[va+dx][vb+dy]>D[va][vb]+1:
          Visit.append((va+dx)*100+(vb+dy))
          D[va+dx][vb+dy]=D[va][vb]+1
    ret=0
    for i in range(h):
      for j in range(w):
        if D[i+1][j+1]<inf:
          ret=max(ret,D[i+1][j+1])
    return ret
ans=0
for i in range(h):
  for j in range(w):
    ans=max(dist(i+1,j+1),ans)
print(ans)
### BUGGY CODE ###

def main():
    mod=998244353
    n,s=map(int,input().split())
    A=list(map(int,input().split()))
    DP=[[0]*(s+1) for _ in range(n+1)]
    p=1
    for i in range(n+1):
        DP[i][0]=p
        p*=2
    for i,a in enumerate(A):
        for j in range(1,s+1):
            DP[i+1][j]=DP[i][j]*2
            if j>=a:
                DP[i+1][j]+=DP[i][j-a]
            DP[i+1][j]%=mod
    print(DP[-1][-1])
    #print(DP)
    
if __name__=='__main__':
    main()

### FIXED CODE ###

def main():
    mod=998244353
    n,s=map(int,input().split())
    A=list(map(int,input().split()))
    DP=[[0]*(s+1) for _ in range(n+1)]
    p=1
    for i in range(n+1):
        DP[i][0]=p
        p*=2
        p%=mod
    for i,a in enumerate(A):
        for j in range(1,s+1):
            DP[i+1][j]=DP[i][j]*2
            if j>=a:
                DP[i+1][j]+=DP[i][j-a]
            DP[i+1][j]%=mod
    print(DP[-1][-1])
    #print(DP)
    
if __name__=='__main__':
    main()
### BUGGY CODE ###

def main():
    S = input()[::-1]

    MOD = 10**9+7
    dp = [[0]*13 for _ in range(len(S)+1)]
    dp[0][0] = 1

    for i in range(1, len(S)+1):
        if S[i-1] == "?":
            N = [(u*10**(i-1)) % 13 for u in range(10)]
        else:
            N = [(int(S[i-1])*10**(i-1)) % 13]
        for n in N:
            for j in range(13):
                dp[i][j] += dp[i-1][j-n % 13]

    print(dp[len(S)][5] % MOD)


if __name__ == "__main__":
    main()


### FIXED CODE ###

S = input()
mod = 10**9+7
dp = [[0]*13 for _ in range(len(S)+1)]
d = 1
dp[0][0] = 1

for i, s in enumerate(S[::-1]):
    if s == "?":
        for j in range(13):
            for k in range(10):
                dp[i+1][(j+(d*k)) % 13] += dp[i][j]
    else:
        for j in range(13):
            dp[i+1][(j+(d*int(s))) % 13] += dp[i][j]
    for j in range(13):
        dp[i+1][j] %= mod
    d = (d*10) % 13
print(dp[-1][5])
### BUGGY CODE ###

from math import log
n = int(input())
A = list(map(int, input().split()))
num = {}
for a in A:
	if a in num:
		num[a] += 1
	else:
		num[a] = 1

ans = 0
cnt = int(log(max(A), 2)) + 5 
for i in range(cnt, 0, -1):
	b = {}
	for x in num:
		if 2 ** i - x in b:
			b[2 ** i - x] += 1
		else:
			b[2 ** i - x] = 1
	for x in num:
		if x in b and num[x] > 0:
			if x * 2 == 2 ** i:
				ans += num[x] // 2
				num[x] %= 2
			else:
				small = min(num[x], num[2 ** i - x])
				ans += small
				num[x] -= small
				num[2 ** i - x] -= small
print(ans)


### FIXED CODE ###

from math import log
n = int(input())
A = list(map(int, input().split()))
num = {}
for a in A:
	if a in num:
		num[a] += 1
	else:
		num[a] = 1

ans = 0
cnt = int(log(max(A), 2)) + 5 
for i in range(cnt, 0, -1):
	b = {}
	for x in num:
		if 2 ** i - x in b:
			b[2 ** i - x] += 1
		else:
			b[2 ** i - x] = 1
	for x in num:
		if x in b and num[x] > 0:
			if x * 2 == 2 ** i:
				ans += num[x] // 2
				num[x] %= 2
			else:
				small = min(num[x], num[2 ** i - x])
				ans += small
				num[x] -= small
				num[2 ** i - x] -= small
print(ans)
### BUGGY CODE ###

def parse(A):
    R=len(A)
    C=len(A[0])
    grid=[[1 for j in range(C)]  for i in range(R)]
    for i in range(R):
        for j in range(C):
            if A[i][j]=='.':
                grid[i][j]=0
                
    return grid

def find(grid):
    black={}
    R=len(grid)
    C=len(grid[0])
    new=[]
    for i in range(R):
        for j in range(C):
            if grid[i][j]==1:
                black[(i,j)]=0
                new+=[(i,j)]
    time=0        
    
    while len(black)<R*C:
        time+=1
        new_black=[]
        for X in new:
            x,y=X
            check=[(x-1,y),(x+1,y),(x,y-1),(x,y+1)]
            for Y in check:
                y1,y2=Y[0],Y[1]
                if y1>R-1 or y1<0 or y2>C-1 or y2<0:
                    continue
                if grid[y1][y2]==0:
                    new_black+=[(y1,y2)]
                    grid[y1][y2]=1
                    black[(y1,y2)]=1
                else:
                    continue
        new=new_black
    return time    

H,W=list(map(int,input().strip().split(' ')))
A=[]
for _ in range(H):
    A+=[input()]
grid=parse(A)
print(find(grid))
    
                    
                                
                    
                
            
            

        

### FIXED CODE ###

# Enter your code here. Read input from STDIN. Print output to STDOUT
def parse(A):
    R=len(A)
    C=len(A[0])
    grid=[[1 for j in xrange(C)]  for i in xrange(R)]
    for i in xrange(R):
        for j in xrange(C):
            if A[i][j]=='.':
                grid[i][j]=0
                
    return grid

def find(grid):
    black={}
    R=len(grid)
    C=len(grid[0])
    new=[]
    for i in xrange(R):
        for j in xrange(C):
            if grid[i][j]==1:
                black[(i,j)]=0
                new+=[(i,j)]
    time=0        
    
    while len(black)<R*C:
        
        time+=1
        new_black=set([])
        
        for X in new:
            x,y=X
            check=[(x-1,y),(x+1,y),(x,y-1),(x,y+1)]
            for Y in check:
                y1,y2=Y[0],Y[1]
                if y1>R-1 or y1<0 or y2>C-1 or y2<0:
                    continue
                if grid[y1][y2]==0:
                    new_black.add((y1,y2))
                    
                    black[(y1,y2)]=1
                else:
                    continue
        for X in new_black:
            grid[X[0]][X[1]]=1
        new=[]
        new=new_black
        #print(new_black)
    return time    

H,W=list(map(int,raw_input().strip().split(' ')))
A=[]
for _ in xrange(H):
    A+=[raw_input()]
grid=parse(A)
print(find(grid))
### BUGGY CODE ###

import numpy as np
MAX = 10**6
 
sieve = [i for i in range(MAX+1)]
 
p = 2
while p * p <= MAX:
    if sieve[p] == p:
        for i in range(p*2, MAX+1, p):
            if sieve[i] == i:
                sieve[i] = p
    p += 1
 
 
N = int(input())
A = list(map(int, input().split()))
pf = []
 
for a in A:
    tmp = set()
    b = a
    while b != 1:
        tmp.add(sieve[b])
        b //= sieve[b]
    pf.append(tmp)
 
 
soin = [0] * (10 ** 6 + 1)
for f in pf:
    for n in f:
        soin[n] += 1
 
if max(soin[2:]) <= 1:
    print('pairwise coprime')
    exit()
 
flag = np.gcd.reduce(A)
 
if flag == 1:
    print('setwise coprime')
else:
    print('not coprime')

### FIXED CODE ###

#!/usr/bin/env python3

import sys
from math import gcd
from collections import Counter
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(input())
A = list(map(int, input().split()))

dup = False
dup_key = None
counter = Counter(A)
for key, val in counter.items():
    if val > 1:
        dup = True
        if dup_key is None:
            dup_key = key
        else:
            dup_key = max(dup_key, key)


def max_gcd_pair(S):
    # Assumption 1: S is the list of numbers
    # Assumption 2: There are no duplicates in S
    s = set(S)
    m = max(S)
    res = 1
    i = m
    while i > 0:
        a = i
        cnt = 0
        while a <= m: # a maxed at max of the list
            if a in s:
                cnt += 1
            a += i
        if cnt >= 2:  # we have found the result
            res = i
            break
        i = i - 1
    return res


pair = max_gcd_pair(A)
if dup:
    pair *= dup_key

if pair == 1:
    print('pairwise coprime')
    sys.exit()


setw = A[0]
for j in range(N):
    setw = gcd(setw, A[j])
if setw == 1:
    print('setwise coprime')
else:
    print('not coprime')
### BUGGY CODE ###

def solve():
  N = int(input())
  X = input()
  bl = X.count('1')
  bit = 0
  for i in range(N):
    bit += int(X[i])<<(N-1-i)
  ans = [0]*N
  dp = [0]*(N+1)
  for i in range(1,N+1):
    dp[i] = dp[i%sum(map(int,list(bin(i)[2:])))]+1
  for i in range(N):
    if X[i]=='1':
      bit1 = bit - (1<<(N-1-i))
      bl1 = bl-1
      if bl1==0:
        ans[i] = 0
        continue
    else:
      bit1 = bit + (1<<(N-1-i))
      bl1 = bl+1
    ans[i] = dp[bit1%bl1]+1
  return ans
print(*solve(),sep='\n')

### FIXED CODE ###

def solve():
  N = int(input())
  X = input()
  x = sum(map(int,list(X)))
  dp = [0]*N
  for i in range(1,N):
    dp[i] = dp[i%sum(map(int,list(bin(i)[2:])))]+1
  cnt1 = 0
  if x>1:
    for i in range(N):
      cnt1 += int(X[-i-1])*pow(2,i,x-1)
      cnt1 %= x-1
  cnt2 = 0
  for i in range(N):
    cnt2 += int(X[-i-1])*pow(2,i,x+1)
    cnt2 %= x+1
  
  ans = [0]*N
  for i in range(N):
    if X[i]=='1':
      if x==1:
        ans[i] = 0
      else:
        num = (cnt1-pow(2,N-i-1,x-1))%(x-1)
        ans[i] = dp[num]+1
    else:
      num = (cnt2+pow(2,N-i-1,x+1))%(x+1)
      ans[i] = dp[num]+1
  return ans
print(*solve(),sep='\n')
### BUGGY CODE ###

import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = input()
    pins = set()

    def rec(s, i):
        if len(s) == 3:
            pins.add(s)
            return

        if i == N:
            return

        # i文字目を使う場合
        rec(s + S[i], i + 1)

        # i文字目を使わない場合
        rec(s, i + 1)

    rec("", 0)
    print(len(pins))


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = list(input())
    ans = 0

    for p in range(1000):
        p = str(p).zfill(3)
        i = 0
        for j in range(N):
            if p[i] == S[j]:
                i += 1
            if i == 3:
                ans += 1
                break

    print(ans)


if __name__ == "__main__":
    main()
### BUGGY CODE ###

N=int(input())
A=list(map(int,input().split()))
for i in range(N):
    print(A.count(i+1))

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
A.sort(key=int)
l=0
for i in range(N):
    c=0
    while l < len(A) and A[l] == i+1:
        l+=1
        c+=1
    print(c)
### BUGGY CODE ###

"""
ai             aj
bi             bj


1              2
2              1

1  how many pairs 
2
"""



import collections
n = int(raw_input())
mem = {1: 1}
primes = [True] * (n + 1)
posprimes = []
for d in range(2, n +1):
	if primes[d] is True:
		posprimes.append(d)
		k = 2
		while(k * d <= n):
			primes[k * d] = False
			k += 1

def f(k):
	if primes[k] is True:
		mem[k] = 2 if k > 1 else 1
		return mem[k]
	for pos in posprimes:
		if k % pos == 0:
			count = 0
			q = k
			while(q % pos == 0):
				q /= pos
				count += 1

			mem[k] = (count + 1) * mem[q]
			return mem[k]



s = 0
k = 1
while (k<= n):
	s += k * f(k)
	k += 1
print s




#2 4 6 8 10 12 14 16 18
#    6      12       18

### FIXED CODE ###



"""
ai             aj
bi             bj


1              2
2              1

1  how many pairs 
2
"""



import collections
n = int(raw_input())
mem = [0] * (n + 1)
mem[1] = 1
primes = [True] * (n + 1)
posprimes = []
d= 2
while( d <= n):
	if primes[d] is True:
		posprimes.append(d)
		k = 2
		while(k * d <= n):
			primes[k * d] = False
			k += 1
	d+=1
def f(k):
	if primes[k] is True:
		mem[k] = 2 if k > 1 else 1
		return mem[k]
	for pos in posprimes:
		if k % pos == 0:
			count = 0
			q = k
			while(q % pos == 0):
				q /= pos
				count += 1

			mem[k] = (count + 1) * mem[q]
			return mem[k]



s = 0
k = 1
while (k<= n):
	s += k * f(k)
	k += 1
print s




#2 4 6 8 10 12 14 16 18
#    6      12       18
### BUGGY CODE ###

q = int(input())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


for _ in range(q):
    l, r = map(int, input().split())
    count = 0
    for i in range(l, r+1)[::2]:
        if is_prime(i):
            j = (i+1)//2
            if is_prime(j):
                count += 1
    print(count)


### FIXED CODE ###

q = int(input())


def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass


prime_list = primes(100000)
familiar = [0]*100001
for p in prime_list:
    if (p+1)//2 in prime_list:
        familiar[p] = 1
s = [0]*100001
for i in range(100000):
    s[i+1] = s[i] + familiar[i+1]


for _ in range(q):
    l, r = map(int, input().split())
    print(s[r]-s[l-1])
### BUGGY CODE ###

import math

def loop1(i, k, ans):
  global arr, result
  for ai in range(int(math.floor(k/arr[i])+1)):
    if (i+1<len(arr)):
      loop1(i+1, k-arr[i]*ai, ans+[ai])
    else:
      if arr[i]*ai==k:
        result=ans+[ai]
        break
  return result
arr=[100, 101, 102, 103, 104, 105]
k=int(input())
result=""
loop1(0, k, [])
if result=="":
  print(0)
else:
  print(1)

### FIXED CODE ###

import math
import fractions
from functools import reduce

def loop1(i, k, ans):
  global arr, result
  for ai in range(int(math.floor(k/arr[i])+1)):
    if (i+1<len(arr)):
      loop1(i+1, k-arr[i]*ai, ans+[ai])
    else:
      if arr[i]*ai==k:
        result=ans+[ai]
        break
  return result

def gcd(*arr):
  return reduce(fractions.gcd, arr)

def loop2(i, k, ans):
  global arr, result
  if k%gcd(*arr[i:len(arr)])==0:
    for ai in range(int(math.floor(k/arr[i])+1)):
      if i+1<len(arr):
        loop2(i+1, k-arr[i]*ai, ans+[ai])
      else:
        result=(ans+[ai])
        break
  return result


arr=[100, 101, 102, 103, 104, 105]
k=int(input())
result=""
if k>=2200:
  print(1)
else:
  loop2(0, k, [])
  if result=="":
    print(0)
  else:
    print(1)
### BUGGY CODE ###

s = input()
t = input()
x = len(s)
y = len(t)
dp = [[""]*(y+1) for _ in range(x+1)]
for i in range(x):
    for j in range(y):
        if s[i] == t[j]:
            lcs = dp[i][j] + s[i]
        elif len(dp[i+1][j]) >= len(dp[i][j+1]):
            lcs = dp[i+1][j]
        else:
            lcs = dp[i][j+1]
        dp[i+1][j+1] = lcs
# for i in range(x+1): print(dp[i])
print(dp[x][y])

### FIXED CODE ###

s = input()
t = input()
x = len(s)
y = len(t)
dp = [[0]*(y+1) for _ in range(x+1)]
for i in range(x):
    for j in range(y):
        if s[i] == t[j]: dp[i+1][j+1] = dp[i][j] + 1
        else: dp[i+1][j+1] = max(dp[i+1][j],dp[i][j+1])
        
# for i in range(x+1): print(dp[i])
ans = ""
i = x
j = y
while i > 0 and j > 0:
    if dp[i][j] == dp[i-1][j]: i -= 1
    elif dp[i][j] == dp[i][j-1]: j -= 1
    else:
        ans = s[i-1]+ans
        i -= 1
        j -= 1
print(ans)
### BUGGY CODE ###

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)
def lcm(a, b):
    return a * b // gcd(a, b)

n = int(input())
a = list(map(int, input().split()))

mod = 10 ** 9 + 7
N = 1000002

#逆元テーブル
inv_t = [0]+[1]
for i in range(2, N):
  inv_t += [inv_t[mod % i] * (mod - int(mod / i)) % mod]

base = a[0]
for ai in a:
    base = lcm(base, ai)
ans = 0
for ai in a:
    ans = (ans + base * inv_t[ai]) % mod
print(ans)


### FIXED CODE ###

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

#逆元テーブル
mod = 10 ** 9 + 7
N = 1000002
inv_t = [0]+[1]
for i in range(2, N):
  inv_t += [inv_t[mod % i] * (mod - int(mod / i)) % mod]

n = int(input())
a = list(map(int, input().split()))
d = [0 for i in range(1000001)]
for ai in a:
    arr = factorization(ai)
    for i, n in arr:
        d[i] = max(d[i], n)

base = 1
for i, n in enumerate(d):
    base = base * i ** n % mod
ans = 0
for ai in a:
    ans = (ans + base * inv_t[ai]) % mod
print(ans)
### BUGGY CODE ###

import itertools

def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
 
n = int(input())
nums = list(range(1,100))
arr = []
com = list(itertools.product(nums, repeat=3))
for i in range(len(com)):
    # print(com)
    ans = func(com[i][0],com[i][1],com[i][2])
    arr.append(ans)
 
for i in range(n):
    print(arr.count(i+1))

### FIXED CODE ###

import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()