Commit 53713963 by BellCodeEditor

auto save

parent 0f53c1f3
Showing with 9 additions and 0 deletions
def s(n):
if n == 1: # 边界
return 1
num = n * s(n-1)
return num
#1+2+3+4+5+6...+n
print(s(5))
#1*2*3*4*5*6...*n
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment