链接:https://www.nowcoder.com/questionTerminal/72a5a919508a4251859fb2cfb987a0e6
public class Solution {
public int RectCover(int target) {
if(target <= 1){
return 1;
}
if(target*2 == 2){
return 1;
}else if(target*2 == 4){
return 2;
}else{
return RectCover((target-1))+RectCover(target-2);
}
}
}
剑指offer 矩形覆盖
最新推荐文章于 2020-08-07 23:23:30 发布