Sum of Divisors for OCaml Golf Competition by murky-satyr

while''do
n=1*io.read()s=n
for i=1,n/2 do s=n%i<1 and s+i or s end
print(n..": "..s)end

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

download

return to the top page