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

while 0=0do let rec n=read_int()and(@)a=function 0->Printf.printf"%d: %d\n"n a|i->a+i*Obj.magic(n/i*i=n)@i-1in 0@n done

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

download

return to the top page