E D R S I H C RSS
ID
Password
Join
You are a bundle of energy always on the go.

FrontPage Factorial

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.0107 sec