标签:
1 class Solution { 2 public: 3 int rectCover(int number) { 4 if(number<=1) 5 return 1; 6 int target=0; 7 int first=1; 8 int second=1; 9 for(int i=2;i<=number;++i) 10 { 11 target=first+second; 12 first=second; 13 second=target; 14 } 15 16 return target; 17 } 18 };
标签:
原文地址:http://www.cnblogs.com/lou424/p/5047684.html