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

PROGRAMMING:Fried chicken stairs

Luz5年前 (2021-05-10)题库424
You know what? There is a programming problem that needs to derive its own formula, which can solve the problem at once.
The specific steps are to calculate several relatively small situations in order, and see if there are rules between them. If you find the rules, you can solve the problem. Try to solve the following problem.
There is a staircase with m steps. At the beginning, you are in the first step. If you can only step up one or two steps at a time, how many ways do you have to go to the M step?
###Input format:
The input data first contains an integer n, representing the number of test cases, and then n lines of data, each line contains an integer m (1 < = m < = 40), representing the number of stairs.
###Output format:
For each test case, please output the number of different methods
###Input example:
```in
two
two
three
```
###Output example:
```out
one
two
```
2015 working group < br > < br > < br > < br > < br >


answer:If there is no answer, please comment