Factorial1000 by twobit

i,t[9<<9];main(c,q){for(q=3e3;i<3e6;c/=10)t[i++%q]=(c+=(i/q+1)*t[i%q])%10;for(i=2568;i;putchar(t[--i]+48));}

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

download

return to the top page