# 题目

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.

Example 1:

Example 2:

Note: You may assume that n is not less than 2 and not larger than 58.

# 解答2[Java]：贪心算法

## 分析

4 的时候可以切分成 2 和 2，5 的时候可以切分成 2 和 3。

$3(N-3)$ 和 $2(N-2)$ 哪个大？

$3(N-3)-2(N-2)=N-5$