Decompose integer into sum of squares by ksk(wrong)

let(%),p=(mod),Printf.printf let(@)i u=i>0&u=p" %d"i;()let rec($)i?(a=i/2106)?(b=i/234%9)?(c=i/18%13)?(d=i%18)n=n>300||a*a+b*b+c*c+d*d=n&p"
"=a@b@c@d@p"%d:"n&1$n+1||i+1$n;;1$1

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

download

return to the top page