题目描述
//尽可能多的3 其余都用2来弥补
class Solution {
public int maxProductAfterCutting(int length)
{
if(length <=3) return length-1;
int res=1;
if(length %3==1) {
res=4;
length-=4;
}
if(length %3==2) {
res=2;
length-=2;
}
while(length>0) {
res*=3;
length-=3;
}
return res;
}
}
blablabla
```