3560. Find Minimum Log Transportation Cost
You are given integers
n,m, andk.There are two logs of lengths
nandmunits, which need to be transported in three trucks where each truck can carry one log with length at mostkunits.You may cut the logs into smaller pieces, where the cost of cutting a log of length
xinto logs of lengthlen1andlen2iscost = len1 * len2such thatlen1 + len2 = x.Return the minimum total cost to distribute the logs onto the trucks. If the logs don’t need to be cut, the total cost is 0.
1 | func minCuttingCost(n, m, k int) int64 { |