Sum of Divisors for OCaml Golf Competition by uru

begin
repeat
var i,s,x:word=0;read(x);for i:=1to x do s:=s+i*ord(x mod i=0);writeln(x,': ',s)until 1=0end.

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

download

return to the top page