求阶乘:如 3! = 3*2*1

def fac(n):
    if n == 1:
        return 1
    return n * fac(n-1)

  

原文地址:https://www.cnblogs.com/seperinna/p/9776895.html