total. Write it as a sum of **at least two** positive integers so that their product is as large as possible.
Return that largest product.total=7 → 12
7 = 3 + 2 + 2 gives 3 · 2 · 2 = 12. For comparison, 3 + 4 also gives 12, while 3 + 3 + 1 gives only 9.
total=3 → 2
There must be at least two parts: 3 = 1 + 2, product 2.
total=12 → 81
12 = 3 + 3 + 3 + 3, product 81.
total ≤ 58total=7
12
Run checks the first 3 tests in your browser. Submit checks all 33 tests on the server, hidden ones included.