• 2022-06-05
    ‌下列函数能够求n的阶乘n!的是​
    A: f = lambda n: n!
    B: def f(n): s=1 for i in range(n): s = s * i return s
    C: def f(n): s=1 for i in range(n,0,-1): s = s * i return s
    D: def f(n): if n == 1: return 1 else: return f(n-1)*n