1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-14 20:01:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<p>给你一个整数数组 <code>nums</code> ,返回数组中最大数和最小数的 <strong>最大公约数</strong></p>
<p>两个数的&nbsp;<strong>最大公约数</strong> 是能够被两个数整除的最大正整数。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>nums = [2,5,6,9,10]
<strong>输出:</strong>2
<strong>解释:</strong>
nums 中最小的数是 2
nums 中最大的数是 10
2 和 10 的最大公约数是 2
</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>nums = [7,5,6,8,3]
<strong>输出:</strong>1
<strong>解释:</strong>
nums 中最小的数是 3
nums 中最大的数是 8
3 和 8 的最大公约数是 1
</pre>
<p><strong>示例 3</strong></p>
<pre><strong>输入:</strong>nums = [3,3]
<strong>输出:</strong>3
<strong>解释:</strong>
nums 中最小的数是 3
nums 中最大的数是 3
3 和 3 的最大公约数是 3
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>2 &lt;= nums.length &lt;= 1000</code></li>
<li><code>1 &lt;= nums[i] &lt;= 1000</code></li>
</ul>