小学奥数题
class Solution {
public:
int integerBreak(int n) {
int ans = 1;
while(n > 6)
ans*=3, n-=3;
if(n == 6) ans*=9;
if(n == 5) ans*=6;
if(n == 4) ans*=4;
if(n == 2) return 1;
if(n == 3) return 2;
return ans;
}
};