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

34 lines
675 B
HTML
Raw Normal View History

2022-03-27 20:46:41 +08:00
<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>