class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ int jumpFloor(int number) { // write code here int a=1,b=2; for(int i=0;i<number-2;i++){ if(i%2==0)a+=b; else b+=a; } if(number%2==1)return a; else return b; } };