Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
beareatapple committed Aug 26, 2021
1 parent a23437b commit 5143494
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion 2021-08/2021-08-26 (day39)/White/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ Runtime: 43 ms, faster than 6.96% of Python3 online submissions for Climbing Sta
Memory Usage: 14.3 MB, less than 44.80% of Python3 online submissions for Climbing Stairs.

# fibonacci
https://en.wikipedia.org/wiki/Fibonacci_number
https://en.wikipedia.org/wiki/Fibonacci_number

# 數學公式解
```python
from math import sqrt
class Solution:
def climbStairs(self, n: int) -> int:
n = n + 1
return math.floor(((1+sqrt(5))**n-(1-sqrt(5))**n)/(2**n*sqrt(5)))
```

0 comments on commit 5143494

Please sign in to comment.