Decompose integer into sum of squares by su

n;t;f(l,a,s){return(t=s+a*a)<n?l&&f(l-1,a,t)?printf(" %d",a):f(l,a+1,s):l|t-n?0:printf("%d: %d",n,a);}g(x){f(x,1,0)||x-3&&g(x+1);}main(){for(;++n<=300;puts(""))g(0);}

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

download

return to the top page