Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
#from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))

que = P[:K]
counter = []
counter.append(sum(que))
for k in range(K,N):
    que.pop(0)
    que.append(P[k])
    counter.append(sum(que))

print((max(counter)+K)/2)



Fixed submission:
N,K = map(int,input().split())
#from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))
cumsum = [0]*(N+1)
counter = []
for k in range(N):
    cumsum[k+1]=cumsum[k]+P[k]

for i in range(N-K+1):
    counter.append(cumsum[i+K]-cumsum[i])

print((max(counter)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))

que = deque(P[:K])
counter = []
counter.append(sum(que))
for k in range(K,N):
    que.popleft()
    que.append(P[k])
    counter.append(sum(que))

print((max(counter)+K)/2)


Fixed submission:
N,K = map(int,input().split())
#from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))
cumsum = [0]*(N+1)
counter = []
for k in range(N):
    cumsum[k+1]=cumsum[k]+P[k]

for i in range(N-K+1):
    counter.append(cumsum[i+K]-cumsum[i])

print((max(counter)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = [(p+1)/2 for p in map(int,input().split()) ]

que = deque(P[:K])
counter = []
counter.append(sum(que))
for k in range(K,N):
    que.popleft()
    que.append(P[k])
    counter.append(sum(que))

print(max(counter))

Fixed submission:
N,K = map(int,input().split())
#from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))
cumsum = [0]*(N+1)
counter = []
for k in range(N):
    cumsum[k+1]=cumsum[k]+P[k]

for i in range(N-K+1):
    counter.append(cumsum[i+K]-cumsum[i])

print((max(counter)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = [(p+1)/2 for p in map(int,input().split()) ]

que = deque(P[:K])
counter = sum(que)
for k in range(K,N):
    que.popleft()
    que.append(P[k])
    counter = max(counter,sum(que))

print(counter)

Fixed submission:
N,K = map(int,input().split())
#from collections import deque

#期待値はΣ(from 1 to pi)/len(pi)
P = list(map(int,input().split()))
cumsum = [0]*(N+1)
counter = []
for k in range(N):
    cumsum[k+1]=cumsum[k]+P[k]

for i in range(N-K+1):
    counter.append(cumsum[i+K]-cumsum[i])

print((max(counter)+K)/2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

mod = pow(10,9)+7
ok = 1

import math

for a in A:
    ok = ok*a//math.gcd(a,ok)

LCM = ok



counter = 0
for a in A:
    counter += LCM//a
    counter %= mod 

print(counter)

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

mod = pow(10,9)+7
ok = 1

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

LCM = lcm_list(A)

import numpy as np
B = np.array(A)
C = LCM//B


print(sum(C)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

mod = pow(10,9)+7

from functools import reduce
import math

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


LCM = lcm_list(A)



counter = 0
for a in A:
    counter += LCM//a
    counter %= mod 

print(counter)

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

mod = pow(10,9)+7
ok = 1

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

LCM = lcm_list(A)

import numpy as np
B = np.array(A)
C = LCM//B


print(sum(C)%mod)
Buggy python submission (verdict: Runtime Error):
A = [0]*N
for i in range(N):
    a = int(input())
    A[i]=a
    li[i]=[list(map(int,input().split())) for i in range(a)]

counter = 0
for humen in product([0,1],repeat=N):
    flag = True
    for i in range(N):
        if humen[i]==1:
            for s in range(A[i]):
                if not li[i][s][1]==humen[li[i][s][0]-1]:
                    flag=False
                    break
        
                
    if flag :
        counter = max(counter,humen.count(1))


print(counter)


Fixed submission:
from itertools import product

N = int(input())

li = [[] for i in range(N)]
A = [0]*N
for i in range(N):
    a = int(input())
    A[i]=a
    li[i]=[list(map(int,input().split())) for i in range(a)]

counter = 0
for humen in product([0,1],repeat=N):
    flag = True
    for i in range(N):
        if humen[i]==1:
            for s in range(A[i]):
                if not li[i][s][1]==humen[li[i][s][0]-1]:
                    flag=False
                    break
        
                
    if flag :
        counter = max(counter,humen.count(1))


print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = list(map(int,input().split()))
counter = 0

for i in range(0,N-1):
    for j in range(i+1,N):
        counter += A[i] ^ A[j]

print(counter%(pow(10,9)+7))

Fixed submission:
import numpy as np
 
mod = 10 ** 9 + 7
 
N = int(input())
A = np.array(list(map(int, input().split())))
 
 
tmp = 0
for n in range(len(bin(max(A)))-2):   # 最大桁数は、最も大きい数値の2進数の桁数
    num_1 = np.count_nonzero((A >> n)&1)   # 1の数をカウント
    num_0 = N - num_1                      # 0の数をカウント
    mul = num_1 * num_0   # 0 XOR 1の回数
    tmp += ((2 ** n)*mul) % mod
ans = tmp%mod
print(ans)
Buggy python submission (verdict: Runtime Error):
#n回,m回　　X =n + 2*m  Y = 2*n + m
X,Y = map(int,input().split())
import numpy as np
a = [[1, 2], [2, 1]]
#次に逆行列を求めます。
mod = pow(10,9)+7

b = np.linalg.inv(a)


Z = np.array([[X],[Y]])

n,m=np.dot(b,Z)
p,q = *n,*m

def comb(n,k,p):
    if k==0:
        return 1
    A = reduce(lambda x,y:x*y%p ,[n-k+1+i for i in range(k)])
    B = reduce(lambda x,y:x*y%p ,[i+1 for i in range(k)])
    return A*pow(B,p-2,p)%p

if p<0 or q<0:
    print(0)
elif not p == int(p) or not q==int(q):
    print(0)
elif p==0 and q==0:
    print(0)
elif p==0:
    print(1)
elif q==0:
    print(1)
else:
    n = int(p)
    m = int(q)
    ans = comb(n,m,mod)

    print(ans%mod)


Fixed submission:
#n回,m回　　X =n + 2*m  Y = 2*n + m
X,Y = map(int,input().split())
import numpy as np
from functools import reduce
import math 
a = [[1, 2], [2, 1]]
#次に逆行列を求めます。
mod = pow(10,9)+7

b = np.linalg.inv(a)


Z = np.array([[X],[Y]])

n,m=np.dot(b,Z)
p,q = *n,*m


def comb(n,k,p):
    if k==0:
        return 1
    A = reduce(lambda x,y:x*y%p ,[n-k+1+i for i in range(k)])
    B = reduce(lambda x,y:x*y%p ,[i+1 for i in range(k)])
    return A*pow(B,p-2,p)%p


if p<0 or q<0:
    print(0)
elif not abs(p-round(p))<pow(10,-3) or not abs(q-round(q))<pow(10,-3):
    print(0)
elif p==0 and q==0:
    print(0)
elif p==0:
    print(1)
elif q==0:
    print(1)
else:
    n = int(round(p))
    m = int(round(q))
    ans = comb(n+m,m,mod)

    print(ans%mod)

Buggy python submission (verdict: Runtime Error):
#n回,m回　　X =n + 2*m  Y = 2*n + m
X,Y = map(int,input().split())
import numpy as np
a = [[1, 2], [2, 1]]
#次に逆行列を求めます。
mod = pow(10,9)+7

b = np.linalg.inv(a)


Z = np.array([[X],[Y]])

n,m=np.dot(b,Z)
p,q = *n,*m



if p<0 or q<0:
    print(0)
elif not p == int(p) or not q==int(q):
    print(0)
else:
    n = int(p)+int(q)
    
    fac = [1]*(n+1)
    for i in range(1,n+1):
        fac[i] = (fac[i-1]*i) % mod 
    print(fac[n])


Fixed submission:
#n回,m回　　X =n + 2*m  Y = 2*n + m
X,Y = map(int,input().split())
import numpy as np
from functools import reduce
import math 
a = [[1, 2], [2, 1]]
#次に逆行列を求めます。
mod = pow(10,9)+7

b = np.linalg.inv(a)


Z = np.array([[X],[Y]])

n,m=np.dot(b,Z)
p,q = *n,*m


def comb(n,k,p):
    if k==0:
        return 1
    A = reduce(lambda x,y:x*y%p ,[n-k+1+i for i in range(k)])
    B = reduce(lambda x,y:x*y%p ,[i+1 for i in range(k)])
    return A*pow(B,p-2,p)%p


if p<0 or q<0:
    print(0)
elif not abs(p-round(p))<pow(10,-3) or not abs(q-round(q))<pow(10,-3):
    print(0)
elif p==0 and q==0:
    print(0)
elif p==0:
    print(1)
elif q==0:
    print(1)
else:
    n = int(round(p))
    m = int(round(q))
    ans = comb(n+m,m,mod)

    print(ans%mod)
Buggy python submission (verdict: Runtime Error):
import sympy
N = int(input())
al = sympy.divisors(N)
L = len(al)
if L%2==1:
    a = al[L//2]
    print((a-1)*(a-1))
else :
    a = al[L//2-1]
    b = al[L//2]
    print(a+b-2)

Fixed submission:
N = int(input())
import math 

start = int(math.sqrt(N))+1
for i in range(start,0,-1):
    if N%i==0:
        print(i+N//i-2)
        break
Buggy python submission (verdict: Runtime Error):
N = int(input())
import math 

start = int(math.sqrt(N))+1
for i in range(start,0,-1):
    if N%i==0:
        print(i+N//i-2)
        break

Fixed submission:
a,b,x = map(int,input().split())

import math 

if x>= a**2*b/2:
    tan = 2*(b/a-x/(a**3))
    y = math.atan(tan)
else :
    tan = a*(b**2)/(2*x)
    y = math.atan(tan)

print(math.degrees(y))
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())

len_ = A-*B

if len_<=0:
    print(0)
else:
    print(len_)

Fixed submission:
A,B = map(int,input().split())

len_ = A-2*B

if len_<=0:
    print(0)
else:
    print(len_)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np 


N,K,Q = map(int,input().split())
arr = np.array([K]*N)

for i in range(Q):
    A = int(input())
    arr[:]-=1
    arr[A-1]+=1
    
for i in range(N):
    if arr[i]>0:
        print("Yes")
    else :
        print("No")

Fixed submission:
N,K,Q = map(int,input().split())

li = [0]*N

for _ in range(Q):
    index = int(input())-1
    li[index]+=1


for num in li:
    if K>Q-num:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int,input().split()))

import functools
#indexi番目にいるときの最小コスト
@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0
    if i==1:
        return abs(H[0]-H[1])
    return min(func(i-1)+abs(H[i]-H[i-1]),func(i-2)+abs(H[i-2]-H[i]))

print(func(N-1))


Fixed submission:
N = int(input())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))

@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0
    if i==1:
        return abs(H[0]-H[1])
    return min(func(i-1)+abs(H[i]-H[i-1]),func(i-2)+abs(H[i-2]-H[i]))

print(func(N-1))

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int,input().split()))

#indexi番目にいるときの最小コスト
def func(i):
    if i==0:
        return 0
    if i==1:
        return abs(H[0]-H[1])
    return min(func(i-1)+abs(H[i]-H[i-1]),func(i-2)+abs(H[i-2]-H[i]))

print(func(N-1))


Fixed submission:
N = int(input())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))

@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0
    if i==1:
        return abs(H[0]-H[1])
    return min(func(i-1)+abs(H[i]-H[i-1]),func(i-2)+abs(H[i-2]-H[i]))

print(func(N-1))
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))


@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0  

    h = H[i] 
    return min(func(i-k)+abs(h-H[i-k]) for k in range(1,min(i,K)+1))
        


print(func(N-1))

Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))

dp = [0]*N
dp[1]= abs(H[1]-H[0])
#dp[i] インデックスiにいるときの最小値
inf = float("inf")

for i in range(1,N-1):
    tmp = inf
    oppai = min(K,i+1)
    for jump in range(1,oppai+1):
        tmp = min(tmp,dp[i+1-jump]+abs(H[i+1]-H[i+1-jump]))
    dp[i+1]=tmp
print(dp[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))


@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0  

    tmp_li = []

    for k in range(1,min(i,K)+1):
        tmp_li.append(func(i-k)+abs(H[i]-H[i-k]))
    return min(tmp_li)




print(func(N-1))


Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))

dp = [0]*N
dp[1]= abs(H[1]-H[0])
#dp[i] インデックスiにいるときの最小値
inf = float("inf")

for i in range(1,N-1):
    tmp = inf
    oppai = min(K,i+1)
    for jump in range(1,oppai+1):
        tmp = min(tmp,dp[i+1-jump]+abs(H[i+1]-H[i+1-jump]))
    dp[i+1]=tmp
print(dp[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))
inf = float("inf")
fly_max = K

@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0  

    tmp = inf
    
    for k in range(1,min(i,K)+1):
        tmp = min(tmp,func(i-k)+abs(H[i]-H[i-k]))
    return tmp




print(func(N-1))


Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))

dp = [0]*N
dp[1]= abs(H[1]-H[0])
#dp[i] インデックスiにいるときの最小値
inf = float("inf")

for i in range(1,N-1):
    tmp = inf
    oppai = min(K,i+1)
    for jump in range(1,oppai+1):
        tmp = min(tmp,dp[i+1-jump]+abs(H[i+1]-H[i+1-jump]))
    dp[i+1]=tmp
print(dp[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
H = list(map(int,input().split()))
import sys
import functools
#indexi番目にいるときの最小コスト
sys.setrecursionlimit(pow(10,6))
inf = float("inf")
fly_max = K

@functools.lru_cache(None)
def func(i):
    if i==0:
        return 0  

    tmp = inf
    
    for k in range(1,min(i,K)+1):
        tmp = min(tmp,func(i-k)+abs(H[i]-H[i-k]))
    return tmp




print(func(N-1))


Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))

dp = [0]*N
dp[1]= abs(H[1]-H[0])
#dp[i] インデックスiにいるときの最小値
inf = float("inf")

for i in range(1,N-1):
    tmp = inf
    oppai = min(K,i+1)
    for jump in range(1,oppai+1):
        tmp = min(tmp,dp[i+1-jump]+abs(H[i+1]-H[i+1-jump]))
    dp[i+1]=tmp
print(dp[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
import sys
K=int(input())
if K%2==0 or K%5==0:
    print('-1')
    sys.exit()
i=1
K=9*K

while(1):
    if 7*(10**i-1)%K==0:
        print(i)
        sys.exit()
    i+=1

Fixed submission:
import sys
K=int(input())
if K%2==0 or K%5==0:
    print('-1')
    sys.exit()
i=1
K=9*K
ans=10-K

while(1):
    if 7*(ans-1)%K==0:
        print(i)
        sys.exit()
    i+=1
    ans=ans*10%K

Buggy python submission (verdict: Time Limit Exceeded):
import sys
K=int(input())
i=1
K=9*K

while(1):
    if 7*(10**i-1)%K==0:
        print(i)
        sys.exit()
    i+=1

Fixed submission:
import sys
K=int(input())
if K%2==0 or K%5==0:
    print('-1')
    sys.exit()
i=1
K=9*K
ans=10-K

while(1):
    if 7*(ans-1)%K==0:
        print(i)
        sys.exit()
    i+=1
    ans=ans*10%K
Buggy python submission (verdict: Runtime Error):
p=input()
if p='ABC':
  print('ARC')
else:
  print('ABC')

Fixed submission:
p=input()
if p=='ABC':
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Time Limit Exceeded):
N=input()
list=[]
a=[]
b=[]
c=[]
s=[]
t=0
for i in range(int(N)):
    list.append(input())
    # for l in range(len(a)):
    #     if(a[l]==list[i]):
    #         b[l]+=1
    #         t=1
    #         break
    # if t==0:
    #     a.append(list[i])
    #     b.append(1)
    # else:
    #     t=0
    if(list[i] in a):
        b[a.index(list[i])]+=1
    else:
        a.append(list[i])
        b.append(1)
m=max(b)
for i in range(len(a)):
    if b[i]==m:
        c.append(a[i])
s=sorted(c)
for i in range(len(s)):
    print(s[i])


    




Fixed submission:
import collections
import sys
N=int(input())
S=[input() for i in range(N)]
c = collections.Counter(S).most_common()
c.sort()
c.sort(key=lambda c:c[1],reverse=True)
max_count=c[0][1]
for _ in c:
  if _[1]==max_count:
    print(_[0])
  else:
    sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
N=input()
list=[]
a=[]
b=[]
c=[]
s=[]
t=0
for i in range(int(N)):
    list.append(input())
    for l in range(len(a)):
        if(a[l]==list[i]):
            b[l]+=1
            t=1
            break
    if t==0:
        a.append(list[i])
        b.append(1)
    else:
        t=0
m=max(b)
for i in range(len(a)):
    if b[i]==m:
        c.append(a[i])
s=sorted(c)
for i in range(len(s)):
    print(s[i])


Fixed submission:
import collections
import sys
N=int(input())
S=[input() for i in range(N)]
c = collections.Counter(S).most_common()
c.sort()
c.sort(key=lambda c:c[1],reverse=True)
max_count=c[0][1]
for _ in c:
  if _[1]==max_count:
    print(_[0])
  else:
    sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
N=input()
list=[]
a=[]
b=[]
c=[]
s=[]
t=0
for i in range(int(N)):
    list.append(input())
    for l in range(len(a)):
        if(a[l]==list[i]):
            b[l]+=1
            t=1
            break
    if t==0:
        a.append(list[i])
        b.append(1)
    else:
        t=0

for i in range(len(a)):
    if b[i]==max(b):
        c.append(a[i])
s=sorted(c)
for i in range(len(s)):
    print(s[i])


    



Fixed submission:
import collections
import sys
N=int(input())
S=[input() for i in range(N)]
c = collections.Counter(S).most_common()
c.sort()
c.sort(key=lambda c:c[1],reverse=True)
max_count=c[0][1]
for _ in c:
  if _[1]==max_count:
    print(_[0])
  else:
    sys.exit()
Buggy python submission (verdict: Runtime Error):
str=input()
maxcnt=0
cnt=0
for i in range(len(str)):
  if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,max)
  else:
    cnt=0
    
print(max)

Fixed submission:
str=input()
maxcnt=0
cnt=0
for i in range(len(str)):
  if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,maxcnt)
  else:
    cnt=0
    
print(maxcnt)
Buggy python submission (verdict: Runtime Error):
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])


Fixed submission:
n=int(input())
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):
  print(l[i+1])

Buggy python submission (verdict: Runtime Error):
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]

Fixed submission:
n=int(input())
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):
  print(l[i+1])

Buggy python submission (verdict: Runtime Error):
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]

Fixed submission:
n=int(input())
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):
  print(l[i+1])

Buggy python submission (verdict: Runtime Error):
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]

Fixed submission:
n=int(input())
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):
  print(l[i+1])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
q=int(input())
dic=dict()
list_sum=sum(l)
for i in range(len(l)):
    if(l[i] not in dic.keys()):
        dic[l[i]]=1
    else:
        dic[l[i]]+=1
# print(dic)

for i in range(q):
    s=0
    b,c=map(int,input().split())
    if(b in dic and dic[b]!=0):
        # s=(c-b)*dic[b]+list_sum
        if(c in dic):
            dic[c]+=dic[b]
            dic[b]=0
        else:
            dic[c]=dic[b]
            dic[b]=0
    for x in dic:
        if(dic[x]!=0):
            s+=x*dic[x]
    print(s)





Fixed submission:
n=int(input())
l=list(map(int,input().split()))
q=int(input())
dic=dict()
list_sum=sum(l)
for i in range(len(l)):
    if(l[i] not in dic.keys()):
        dic[l[i]]=1
    else:
        dic[l[i]]+=1
# print(dic)
s=list_sum
for i in range(q):
    b,c=map(int,input().split())
    # print(dic)
    if(b in dic and dic[b]!=0):
        s+=(c-b)*dic[b]
        if(c in dic):
            dic[c]+=dic[b]
            dic[b]=0
        else:
            dic[c]=dic[b]
            dic[b]=0
    
    print(s)
    # print(dic)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
q=int(input())
dic=dict()
list_sum=sum(l)
for i in range(len(l)):
    if(l[i] not in dic.keys()):
        dic[l[i]]=1
    else:
        dic[l[i]]+=1
# print(dic)

for i in range(q):
    s=0
    b,c=map(int,input().split())
    if(b in dic.keys() and dic[b]!=0):
        # s=(c-b)*dic[b]+list_sum
        if(c in dic.keys()):
            dic[c]+=dic[b]
            dic[b]=0
        else:
            dic[c]=dic[b]
            dic[b]=0
    for x in dic:
        if(dic[x]!=0):
            s+=x*dic[x]
    print(s)





Fixed submission:
n=int(input())
l=list(map(int,input().split()))
q=int(input())
dic=dict()
list_sum=sum(l)
for i in range(len(l)):
    if(l[i] not in dic.keys()):
        dic[l[i]]=1
    else:
        dic[l[i]]+=1
# print(dic)
s=list_sum
for i in range(q):
    b,c=map(int,input().split())
    # print(dic)
    if(b in dic and dic[b]!=0):
        s+=(c-b)*dic[b]
        if(c in dic):
            dic[c]+=dic[b]
            dic[b]=0
        else:
            dic[c]=dic[b]
            dic[b]=0
    
    print(s)
    # print(dic)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
print(b+a)

Fixed submission:
a,b=input().split()

print(b+a)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5==1 and c7==1 and c2==1):
            print("No")
        elif(c5<2):
            print("Yes")
        else:
            print("No")

Fixed submission:
a,b=map(int,input().split())
if(a<10 and b<10):
  print(a*b)
else:
  print(-1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5<2):
            print("Yes")
        else:
            print("No")

Fixed submission:
a,b=map(int,input().split())
if(a<10 and b<10):
  print(a*b)
else:
  print(-1)