计算n的阶乘
def jiecheng(n):
if n == 1:
return 1
# n != 1
return n * jiecheng(n - 1)
result = jiecheng(5)
print(result)
计算n的阶乘
def jiecheng(n):
if n == 1:
return 1
# n != 1
return n * jiecheng(n - 1)
result = jiecheng(5)
print(result)