int climbStairs(int n){ int i, pre=1, prepre=0, cur=0; for(i=1; i<=n; i++){ cur=pre+prepre; prepre=pre; pre=cur; } return cur; }