Climbing Stairs
You are climbing a staircase with n steps. Each time you can climb either 1 step or 2 steps.
Return the number of distinct ways you can climb to the top.
Example 1
Input
n = 2Output
2There are two ways to climb to the top: 1 step + 1 step, or 2 steps.
Example 2
Input
n = 3Output
3There are three ways to climb to the top: 1 + 1 + 1, 1 + 2, or 2 + 1.
Constraints
- 1 <= n <= 45