MCPcopy Create free account
hub / github.com/aizk/algorithm-practice / main

Function main

dp/0343-integer-break/main.go:20–22  ·  view source on GitHub ↗

给定一个正整数 n,将其拆分为至少两个正整数的和,并使这些整数的乘积最大化。 返回你可以获得的最大乘积。 示例 1: 输入: 2 输出: 1 解释: 2 = 1 + 1, 1 × 1 = 1。 示例 2: 输入: 10 输出: 36 解释: 10 = 3 + 3 + 4, 3 × 3 × 4 = 36。 说明: 你可以假设 n 不小于 2 且不大于 58。 Related Topics 数学 动态规划

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

integerBreakFunction · 0.85

Tested by

no test coverage detected