Tap here to switch tabs
Problem
Submissions

Problem: Climbing Stairs

Climbing Stairs asks how many distinct sequences of one-step and two-step moves can reach the top of a staircase with a given number of steps.

Statement

You are climbing a staircase. It takes n steps to reach the top. Each time, you can either climb 11 or 22 steps. In how many distinct ways can you climb to the top?

Constraints:

  • 1≤1 \leq n ≤45\leq 45
⋮
Tap here to switch tabs
Problem
Submissions

Problem: Climbing Stairs

Climbing Stairs asks how many distinct sequences of one-step and two-step moves can reach the top of a staircase with a given number of steps.

Statement

You are climbing a staircase. It takes n steps to reach the top. Each time, you can either climb 11 or 22 steps. In how many distinct ways can you climb to the top?

Constraints:

  • 1≤1 \leq n ≤45\leq 45