I share my solution which doesn't have a fancy theory.

I did it by a trial and error methodology

I learned a lot from hot solutions. Great job guys.!

```
public int integerBreak(int n) {
int max = 0;
for(int i=1;i<=3 && i<n;i++){
int power = n/i;
if(n%i == 1 && i+n%i < n){
max = Math.max(max, (int)Math.pow(i,power-1) * (i+n%i));
}else{
max = Math.max(max, (int)Math.pow(i,power)*((n%i)==0?1:n%i));
}
}
return max;
}
```