GCD of 1 to n by medialuna

in=:".&.>0{"1[_2]\;:(1!:1)3
f=:3 :'+./>:i.x:y'
stdout&.>(,&LF)&.>(<@":"0) f"0 >in

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

download

return top