LCM of 1 to n by hirose

while 1:n=input();p=s=1;exec"m=n/p;t=s\nwhile t%p*m:m/=p;s*=p\np+=1;"*n;print s

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

download

return to the top page