leetcode70- Climbing Stairs

难度:eazy

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?

Note: Given n will be a positive integer.

leetcode70- Climbing Stairs

思路木有思路,借鉴别人的。

当台阶数输入为1, 2, 3, 4, 5, 6, 7, 8, 9, 10时,输出为1, 2, 3, 5, 8, 13, 21, 34, 55, 89,是斐波那契数列!除了1和2以外,其余均为前两个数相加

python 交换两个变量的值

leetcode70- Climbing Stairs

leetcode70- Climbing Stairs