C++ 一行:return pow(2,number-1);数学知识 台阶个数:可能情况:种类 :1(该数字表示跳台阶数):1(2^0) : 1 1(1种) 2(一次跳两台阶)(1种) :2 (1+1)(2^1) : 1 1 1(1种) 1 2(2 1)(2种)3(1种) : 4 (1+2+1) (2^2) : 1 1 1 1 (1种)1 2 1(3种)1 3(2种)2 2(1种)4 (1种) :8(1+3+2+1+1) (2^3)结论:n层:2^(n-1)种;另外:C(k,0) + C(k,1) + C(k,2) + ... + C(k,k-1) +...