Break n into the sum of at least two positive integers and return the maximum product of those parts.
n
n = 2
1
Why
2 = 1 + 1, product 1
n = 10
36
10 = 3 + 3 + 4, product 36
2 <= n <= 58
Topics
Implement integerBreak in the editor and return the answer — printing it is never graded.
integerBreak
Problem 95 of 1146 in the arena