Problem 3958 · Medium

Minimum Cost to Split into Ones II

Break a total into two positive parts, paying the product of the parts, and keep the cheapest way to reach all ones.

Open the interactive visualisation