61.1k views
2 votes
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

1 Answer

7 votes

Answer:

(n^2 + n)/2 ways

Step-by-step explanation:

Each time you can climb 1 or 2 steps to the top (n steps)

Number of ways climbing 1 step to the top = n combination 1 = n!/(n-1)1! = n(n-1)!/(n-1)! = n

Number of ways climbing 2 steps to the top = n combination 2 = n!/(n-2)!2! = n(n-1)(n-2)!/2(n-2)! = (n^2 - n)/2

Total number of ways = n + (n^2 - n)/2 = (2n + n^2 - n)/2 = (n^2 + n)/2 ways

User Alexmherrmann
by
4.5k points