r=lambda(x):range(-x,x+1) for n in range(51):print sum(x*x+y*y+z*z<=n*n for x in r(n)for y in r(int((n*n-x*x)**.5))for z in r(int((n*n-x*x-y*y)**.5)))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page