标签:logs cli bst bsp tair while turn div --
class Solution { public: int climbStairs(int n) { using namespace std; int a=1,b=1,number=0; if(n==0||n==1) { return 1; } while(n>1) { number=a+b; a=b; b=number; n--; } return number; } };
标签:logs cli bst bsp tair while turn div --
原文地址:http://www.cnblogs.com/ZJJ644758437/p/6517375.html