矩形覆盖
题目
分析
代码
public class Solution {
public int RectCover(int target) {
if(target<=2){
return target;
}
int first=1;
int second=2;
int index=3;
while (index<=target){
int temp=first+second;
first=second;
second=temp;
index++;
}
return second;
}
}