terminal
Elevo
/
ESC
Login
Initiate Registration
code
Topics
corporate_fare
Companies
history
History
arrow_back
Back to Challenges
#70
Climbing Stairs
Easy
Acceptance 0%
Editorial
description
Problem Description
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?
checklist
Constraints
1 <= n <= 45
science
Examples
Case #1
In:
n = 2
Out:
2
Case #2
In:
n = 3
Out:
3
Mastery Tags
Dynamic Programming
Math
Hiring Companies
Amazon
Apple
Google
code
Integrated IDE
Python 3
expand_more
C
C++ 17
Java
JavaScript
Python 3
C
C++ 17
Java
JavaScript
Python 3
refresh
class Solution: def climbStairs(self, n: int) -> int: pass
Login to Compile
Processing
terminal
Debug Output
home
Home
extension
Practice
robot_2
login
Sign In
account_circle
Menu
code_blocks
Coding
psychology
Aptitude
Navigation
close
Login
Registration