1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/三个数的最大乘积 [maximum-product-of-three-numbers].html
2022-03-29 12:43:11 +08:00

34 lines
675 B
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你一个整型数组 <code>nums</code> ,在数组中找出由三个数组成的最大乘积,并输出这个乘积。</p>
<p> </p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>nums = [1,2,3]
<strong>输出:</strong>6
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>nums = [1,2,3,4]
<strong>输出:</strong>24
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>nums = [-1,-2,-3]
<strong>输出:</strong>-6
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>3 <= nums.length <= 10<sup>4</sup></code></li>
<li><code>-1000 <= nums[i] <= 1000</code></li>
</ul>