标签:esc div 一个 覆盖 pre int tle -- solution
class Solution { public: int rectCover(int number) { if(number == 0){ return 0; } if(number == 1){ return 1; } if(number == 2){ return 2; } int a = 1,b = 2,c = 0; while((number--) > 2){ c = a + b; a = b; b = c; } return c; } };
标签:esc div 一个 覆盖 pre int tle -- solution
原文地址:http://www.cnblogs.com/dingxiaoqiang/p/7905809.html