Sum of Divisors for OCaml Golf Competition by Kurata

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

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

download

return to the top page