Factorial by murky-satyr

for(;n=readline(c=0);print(a.reverse().join('')))for(a=[m=1];+n;m=k,n--)for(k=0;c|k<m;a[k++]%=10)c=(a[k]=(a[k]|0)*n+c)/10|0

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

download

return to the top page