Problem p02608 (python)

Fixed submission:
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())

ans_lis =[0]*10000000


nn=math.sqrt(N)
n=int(nn)
#per_lis=itertools.permutations(list(range(1,4)))
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            tmp=0
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for g in range(N):
    print(ans_lis[g])

Buggy submission (verdict: Runtime Error):
import sys
import math
import statistics
import itertools
from collections import deque
n=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000
 
#per_lis=itertools.permutations(list(range(1,4)))
 
for i in range(1,11):
    for j in range(1,11):
        for k in range(1,11):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for i in range(n):
    print(ans_lis[i])
            
 
 
 
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000

#per_lis=itertools.permutations(list(range(1,4)))
n=int(math.sqrt(N))
for i in range(1,11):
    for j in range(1,11):
        for k in range(1,11):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for i in range(n):
    print(ans_lis[i])
            



import sys
import math
import statistics
import itertools
from collections import deque
n=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000
 
#per_lis=itertools.permutations(list(range(1,4)))
 
for i in range(1,11):
    for j in range(1,11):
        for k in range(1,11):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for i in range(n):
    print(ans_lis[i])
            
 
 
 
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000

#per_lis=itertools.permutations(list(range(1,4)))
n=int(math.sqrt(N))
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for g in range(n):
    print(ans_lis[g])

Buggy submission (verdict: Runtime Error):
import sys
import math
import statistics
import itertools
from collections import deque
n=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000
 
#per_lis=itertools.permutations(list(range(1,4)))
 
for i in range(1,11):
    for j in range(1,11):
        for k in range(1,11):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for i in range(n):
    print(ans_lis[i])
            
 
 
 
import sys
import math
import statistics
import itertools
from collections import deque
N=int(input())
#n,m=map(int,input().split()))
#lis=list(map(int,input().split()))
#side=[]
#for _ in range(m):
    #side.append(tuple(map(int,input().split())))
ans_lis =[0]*1000000

#per_lis=itertools.permutations(list(range(1,4)))
n=int(math.sqrt(N))
for i in range(1,11):
    for j in range(1,11):
        for k in range(1,11):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            ans_lis[tmp-1]+=1
for i in range(n):
    print(ans_lis[i])