umdreamer / leetcodeproblems

Solutions for LeetCode OJ
3 stars 9 forks source link

2023.5.19 Problem: 70. Climbing Stairs #17

Closed umdreamer closed 1 year ago

umdreamer commented 1 year ago
  1. Climbing Stairs

You are climbing a staircase. It takes n steps to reach the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

Example 1:

Input: n = 2
Output: 2
Explanation: There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps

Example 2:

Input: n = 3
Output: 3
Explanation: There are three ways to climb to the top.
1. 1 step + 1 step + 1 step
2. 1 step + 2 steps
3. 2 steps + 1 step

Constraints:

zxm-1235 commented 1 year ago

image

liu-si-han commented 1 year ago
image
tangyexi commented 1 year ago
屏幕截图 2023-05-19 200402
sjh397 commented 1 year ago

image

686xiaozhang commented 1 year ago

QQ截图20230519201921

PinkyLame commented 1 year ago

image

zhjingyan commented 1 year ago

image

promisewith7 commented 1 year ago

image

wangshiqi7 commented 1 year ago
截屏2023-05-19 20 53 10
xkqwww commented 1 year ago

无标题

huangyumei1 commented 1 year ago

QQ图片20230519210104

ZWJ2212061008 commented 1 year ago

image

123lrb commented 1 year ago

`OWFMWF{E0 FG7FBTL)7D%5

zyhzxy99 commented 1 year ago

$V66)`7IP6SP9BS)%`RCUUJ

bedauern commented 1 year ago
Snipaste_2023-05-19_21-14-16
daowuwu commented 1 year ago

JK_O}SSF8D {GJHWZ6IW0

shylieisme commented 1 year ago

$QT6S~JLFR XGWYX K(6TX0

foxbou commented 1 year ago
image
cuixiao02 commented 1 year ago

![Uploading 截屏2023-05-19 21.31.12.png…]()

cuixiao02 commented 1 year ago

![Uploading 截屏2023-05-19 21.31.12.png…]()

cuixiao02 commented 1 year ago
截屏2023-05-19 21 31 12
12baoxingyu-6 commented 1 year ago
image
cuixiao02 commented 1 year ago
截屏2023-05-19 21 31 12
FXL1006 commented 1 year ago
image
syr2212061031 commented 1 year ago

DSI9%6@U5LMG23UDYCF ON

mafanjia commented 1 year ago

截屏8

htywan commented 1 year ago

11

Lggg1234 commented 1 year ago

屏幕截图 2023-05-19 214650

liuhuanyu6 commented 1 year ago

image

gusuning commented 1 year ago
屏幕截图 2023-05-19 220547
24zlx commented 1 year ago

联想截图_20230519222409

naqianqpg commented 1 year ago

@8K8AV$%ZM(35(PFA0$Q ZJ

xiaolu2002 commented 1 year ago

image

yeyuxq commented 1 year ago
image
zangfushuo commented 1 year ago
截屏2023-05-19 23 20 22