import math r=range(-50,52) p=[0]*500 for x in r: for y in r: for z in r:p[math.ceil((x*x+y*y+z*z)**.5)]+=1 a=0 for x in p[:51]:a+=x;print(a)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page