标签:describe return while floor number 应该 ber 注意 class
class Solution { public: int jumpFloor(int number) { if(number == 0){ return 1; } if(number == 1){ return 1; } int a = 1; int b = 1; int c = 0; while((number--) > 1){ c = a + b; a = b; b = c; } return c; } };
标签:describe return while floor number 应该 ber 注意 class
原文地址:http://www.cnblogs.com/dingxiaoqiang/p/7905739.html