import time import functools def performance(f): def timeit(x): start = time.clock() f(x) end = time.clock() return end - start return timeit @performance def factorial(n): return functools.reduce(lambda x, y: x * y, range(1, n+1)) print(factorial(10))
精慕门闇黑龙帝
相关分类