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

let rec f?(x=read_int())?(s=ref 0)u=for y=1to x do x/y*y=x&u=(s:=!s+y)done;f(Printf.printf"%d: %d\n"x!s);;f()

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

download

return to the top page