Current location - Training Enrollment Network - Mathematics courses - Mathematical problems when going upstairs
Mathematical problems when going upstairs
Classification: Education/Science >> Science and Technology

Problem description:

There are 15 flights of stairs on the first floor. You can take one or two stairs upstairs. How many ways are there to go upstairs?

Analysis:

987

Let f(x) be the total number of stairs with X floors upward.

Then: f( 1)= 1 f(2)=2.

f(x)=f(x- 1)+f(x-2)

(Think about it, if I go to section X, I will take one more step to section x- 1 or two more steps to section x-2, and the total number of moves will naturally be moved to section x- 1 plus to section x-2. )

In fact, this is the famous 1 2 3 5 8 13 sequence (I forgot what it was called).

Come on, it's only a dozen times, and it's 987.