思路:
int integerBreak(int n) {
int dp[n + 1];
memset(dp, 0, sizeof(dp)); //初始化
for (int i = 2; i <= n; i++) {
int curMax = 0;
for (int j = 1; j < i; j++) { //递归
curMax = fmax(curMax, fmax(j * (i - j), j * dp[i - j]));
}
dp[i] = curMax;
}
return dp[n];
}