s;main(n,r,d){for(d&=3;--n+51;s=d?s:!printf("%d\n",s))d>2?s+=r>=n*n:main(51,d?r-n*n:n*n,d+1);}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page