Decompose integer into sum of squares by 51b

void main(){int[][301]a;for(int n;++n;printf=\n){for(int m=9,x,l,k;l=n-++x*x,l>=0;m=m>k?a[n]=a[l]~x,k:m)k=a[l].length;printf("%d:",n);foreach(i;a[n])printf(" %d",i);}}

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

download

return to the top page