Factorial1000 by macik

class G{static void Main(){int i=2,j,c,t=1000,e=856,a;int[]y=new int[e];y[0]=1;for(;i<=t;i++)for(j=c=0;j<e;){a=y[j]*i+c;c=a/t;y[j++]=a%t;}for(;e>0;)System.Console.Write("{0:D3}",y[--e]);}}

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

download

return to the top page