https://leetcode-cn.com/problems/climbing-stairs/
class Solution {
public int climbStairs(int n) {
int x=1,y=2,t=0;
if (n==1){
return 1;
}
if (n==2){
return 2;
}
for (int i=2;i<n;i++) {
t=x+y;
x=y;
y=t;
}
return t;
}
}