You are given an integer n. Starting with a single integer n, you repeatedly perform operations until all remaining values are equal to
In one operation, you can select any current integer x that is strictly greater than a and b such that a b x. The cost of performing this split is a $ imes$ b.
Return the minimum total cost required to split n into all ones.
Constraints:
n
You are given an integer n. Starting with a single integer n, you repeatedly perform operations until all remaining values are equal to
In one operation, you can select any current integer x that is strictly greater than a and b such that a b x. The cost of performing this split is a $ imes$ b.
Return the minimum total cost required to split n into all ones.
Constraints:
n