Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Leetcode 70
- 프로그래머스 실패율
- 프로그래머스 구명보트
- vim 괄호 비활성화
- Python Imaging Library
- linux prompt color
- vim 찾아 바꾸기
- python3
- vi/vim 명령어
- linux bash
- 프로그래머스
- Leetcode 121
- apt autoremove
- Resolution Changing
- vim set noshowmatch
- gnuplot csv
- Climbing Stairs
- git commit message
- latex 첨자
- 프로그래머스 체육복
- 걸쳐서 그림 넣기
- csv x range
- without nohup.out
- VirtualBox
- tensorflow model load
- vim 치환
- vi/vim commands
- url reference
- apt clean
- LaTeX figure
Archives
- Today
- Total
기억노트
[Leetcode/Python3] 70. Climbing Stairs 본문
Code
class Solution:
def climbStairs(self, n: int) -> int:
d = [0] * 46
d[1] = 1
d[2] = 2
for i in range(3, n+1):
d[i] = d[i-1] + d[i-2]
return d[n]
Result
Runtime: 41 ms
Memory Usage: 14.5 MB
'Coding Test 준비 > Leetcode' 카테고리의 다른 글
[Leetcode/Python3] 121. Best Time to Buy and Sell Stock (0) | 2022.01.11 |
---|