Skip to content

Commit

Permalink
Fibonacci
Browse files Browse the repository at this point in the history
  • Loading branch information
BuglessCoder authored Mar 4, 2018
1 parent 9e21746 commit c9c8113
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 超级楼梯.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
n=5
def fei(n):
if n == 1 or n == 2:
return 1
elif n > 2:
return fei(n-1) + fei(n-2)
else:
return 0
print(fei(n))

0 comments on commit c9c8113

Please sign in to comment.