mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个整数数组 <code>nums</code> ,返回数组中最大数和最小数的 <strong>最大公约数</strong> 。</p>\n\n<p>两个数的 <strong>最大公约数</strong> 是能够被两个数整除的最大正整数。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>nums = [2,5,6,9,10]\n<strong>输出:</strong>2\n<strong>解释:</strong>\nnums 中最小的数是 2\nnums 中最大的数是 10\n2 和 10 的最大公约数是 2\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>nums = [7,5,6,8,3]\n<strong>输出:</strong>1\n<strong>解释:</strong>\nnums 中最小的数是 3\nnums 中最大的数是 8\n3 和 8 的最大公约数是 1\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>nums = [3,3]\n<strong>输出:</strong>3\n<strong>解释:</strong>\nnums 中最小的数是 3\nnums 中最大的数是 3\n3 和 3 的最大公约数是 3\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>2 <= nums.length <= 1000</code></li>\n\t<li><code>1 <= nums[i] <= 1000</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 16,
|
||||
"likes": 19,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"11.6K\", \"totalSubmission\": \"14.8K\", \"totalAcceptedRaw\": 11638, \"totalSubmissionRaw\": 14786, \"acRate\": \"78.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"12.5K\", \"totalSubmission\": \"16K\", \"totalAcceptedRaw\": 12507, \"totalSubmissionRaw\": 15960, \"acRate\": \"78.4%\"}",
|
||||
"hints": [
|
||||
"Find the minimum and maximum in one iteration. Let them be mn and mx.",
|
||||
"Try all the numbers in the range [1, mn] and check the largest number which divides both of them."
|
||||
|
Reference in New Issue
Block a user