python 菜鸟,请大家赐教
python 菜鸟,请大家赐教
|
andyhuzhillJul 29, 2017
1
自己写
|
|
metaquantJul 29, 2017
2
可以自己写
fac = lambda n:reduce(lambda x,y:x*y,range(1,n+1)) |
|
lunaticus7Jul 29, 2017
3
from operator import mul
fac = lambda x: reduce(mul, range(1, x + 1)) |
|
4
import math
math.factorial(x) |
|
PythonAnswerJul 30, 2017 via Android
5
4 楼正解。
|