牛客-变态跳台阶
2^(n-1)次方
#include <stdio.h>
#include <queue>
#include <stack>
#include <math.h>
#include <map>
#include <string.h>
#include <string>
#include <cstring>
#include <set>
#include <algorithm>
#include <vector>
using namespace std;
class Solution {
public:
int jumpFloorII(int number) {
if (number == 0 || number == 1) {
return 1;
}
int ans = 1;
for (int i=1; i<number; i++) {
ans *= 2;
}
return ans;
}
};