Sum of Divisors for OCaml Golf Competition by yshl

[.runstdin]{([)exch def[=only(: )print 0 1 1[sqrt{[1 index mod 0 eq{[1 index
idiv 2 copy eq{pop 0}if add add/}if pop}for =}forall

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

download

return to the top page