或者你先自己算一遍。。给写在哪个文件里,然后再算的时候直接读取就行了,半秒都用不了……
你做梦呢,10000的阶乘就够你算N辈子了,还100000,你不如
算100000的100000次方,全是0的话你还有可能数的过来,可能性为0~~~
For numIndex As Integer = 2 To number
carry = 0
For arrayIndex = 0 To arrayTail
midProduct = product(arrayIndex) * numIndex + carry
carry = midProduct \ DIVISOR
product(arrayIndex) = midProduct - DIVISOR * carry
Next arrayIndex
Do While carry <> 0
product(arrayIndex) = carry Mod DIVISOR
carry = carry \ DIVISOR
arrayIndex += 1
Loop
arrayTail = arrayIndex - 1
Next numIndex
For
numIndex
As
Integer
=
2
To
number
carry
=
0
For
arrayIndex
=
0
To
arrayTail
midProduct
=
product(arrayIndex)
*
numIndex
+
carry
carry
=
midProduct
\
DIVISOR
product(arrayIndex)
=
midProduct
-
DIVISOR
*
carry
Next
arrayIndex
Do
While
carry
<>
0
product(arrayIndex)
=
carry
Mod
DIVISOR
carry
=
carry
\
DIVISOR
arrayIndex
+=
1
Loop
arrayTail
=
arrayIndex
-
1
Next
numIndex