Sum of Divisors for OCaml Golf Competition by kinaba (rakuda)

let rec(^)i?(n=read_int())a=i>n/2&1^0=Printf.printf"%d: %d
"n(n+a);(^)(i+1)~n(n/i*i/n*i+a);;1^0

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

download

return to the top page