分析
假设走阶楼梯有种走法,则

可知:






所以一行代码搞定

class Solution {
public:
    int jumpFloorII(int number) {
        return 1 << (number - 1);
    }
};