mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
25 lines
746 B
HTML
25 lines
746 B
HTML
|
<p>现需要将一根长为正整数 <code>bamboo_len</code> 的竹子砍为若干段,每段长度均为 <strong>正整数</strong>。请返回每段竹子长度的 <strong>最大乘积</strong> 是多少。</p>
|
|||
|
|
|||
|
<p>答案需要取模 1e9+7(1000000007),如计算初始结果为:1000000008,请返回 1。</p>
|
|||
|
|
|||
|
<p> </p>
|
|||
|
|
|||
|
<p><strong>示例 1:</strong></p>
|
|||
|
|
|||
|
<pre>
|
|||
|
<strong>输入:</strong>bamboo_len = 12
|
|||
|
<strong>输出:</strong>81
|
|||
|
</pre>
|
|||
|
|
|||
|
<p> </p>
|
|||
|
|
|||
|
<p><strong>提示:</strong></p>
|
|||
|
|
|||
|
<ul>
|
|||
|
<li><code>2 <= bamboo_len <= 1000</code></li>
|
|||
|
</ul>
|
|||
|
|
|||
|
<p>注意:本题与主站 343 题相同:<a href="https://leetcode-cn.com/problems/integer-break/">https://leetcode-cn.com/problems/integer-break/</a></p>
|
|||
|
|
|||
|
<p> </p>
|