标签:int 楼梯 tair cli bsp bst turn write ram
class Solution {
public:
/**
* @param n: An integer
* @return: An integer
*/
int climbStairs(int n) {
// write your code here
// write your code here
int one = 0;
int two = 1;
while(n>0) {
two=one+two;
one=two-one;
n--;
}
return two;
}
};
标签:int 楼梯 tair cli bsp bst turn write ram
原文地址:http://www.cnblogs.com/majixian/p/6523389.html