E D R S I H C RSS
ID
Password
Join
Even the boldest zebra fears the hungry lion.

FrontPage Factorial

No older revisions available



import time
import math

start_time = time.time()
result = reduce(lambda x, y: x * y, range(1, 10001))
end_time = time.time()
print '%f s' % (end_time - start_time )
print result

start_time = time.time()
result = math.factorial(10000)
end_time = time.time()
print '%f s' % (end_time - start_time )
print result
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-11-06 02:50:19
Processing time 0.0510 sec