Commit 0e917981 by BellCodeEditor

save project

parent 4037a75f
Showing with 10 additions and 0 deletions
p=input('请输入月数:')
def q(n):
if n<=2:
return 1
else:
v=q(n-1)+q(n-2)
return v
func_v=q(int(p))
print(p+'个月后共有'+str(func_v)+'对此生物')
\ No newline at end of file
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