-->
当前位置:首页 > 题库

PROGRAMMING:The problem of N stairs going up

Luz5年前 (2021-05-10)题库419
How many ways to go up the stairs. For example, when there is only one stair, there is only one method; When a staircase has two steps, it can span one step and two times at a time, or it can span two steps and one time at a time, so there are two methods.
###Input format:
The input includes an integer n, (1 < = n < 46).
###Output format:
Output the total number of ascending modes when the stair order is n.
###Input sample 1:
```in
three
```
###Output sample 1:
```out
three
```
###Input sample 2:
```in
four
```
###Output sample 2:
```out
five
```







answer:If there is no answer, please comment