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

let rec($)x?(y=read_int())s=($)~y(x+1)(x*2>y&(Printf.printf"%d: %d
"y(s+y);1$0);s+y/x*x/y*x);;1$0

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

download

return to the top page