1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-02 22:13:28 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给你一个整数&nbsp;<code>num</code>,请你找出同时满足下面全部要求的两个整数:</p>\n\n<ul>\n\t<li>两数乘积等于 &nbsp;<code>num + 1</code>&nbsp;或&nbsp;<code>num + 2</code></li>\n\t<li>以绝对差进行度量,两数大小最接近</li>\n</ul>\n\n<p>你可以按任意顺序返回这两个整数。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>num = 8\n<strong>输出:</strong>[3,3]\n<strong>解释:</strong>对于 num + 1 = 9最接近的两个因数是 3 &amp; 3对于 num + 2 = 10, 最接近的两个因数是 2 &amp; 5因此返回 3 &amp; 3 。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>num = 123\n<strong>输出:</strong>[5,25]\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre><strong>输入:</strong>num = 999\n<strong>输出:</strong>[40,25]\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= num &lt;= 10^9</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 25,
"likes": 27,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"6.1K\", \"totalSubmission\": \"11.5K\", \"totalAcceptedRaw\": 6132, \"totalSubmissionRaw\": 11485, \"acRate\": \"53.4%\"}",
"stats": "{\"totalAccepted\": \"6.2K\", \"totalSubmission\": \"11.7K\", \"totalAcceptedRaw\": 6246, \"totalSubmissionRaw\": 11728, \"acRate\": \"53.3%\"}",
"hints": [
"Find the divisors of n+1 and n+2.",
"To find the divisors of a number, you only need to iterate to the square root of that number."