mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 21:46:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>一个 <strong>平方和三元组</strong> <code>(a,b,c)</code> 指的是满足 <code>a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup></code> 的 <strong>整数 </strong>三元组 <code>a</code>,<code>b</code> 和 <code>c</code> 。</p>\n\n<p>给你一个整数 <code>n</code> ,请你返回满足<em> </em><code>1 <= a, b, c <= n</code> 的 <strong>平方和三元组</strong> 的数目。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><b>输入:</b>n = 5\n<b>输出:</b>2\n<b>解释:</b>平方和三元组为 (3,4,5) 和 (4,3,5) 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><b>输入:</b>n = 10\n<b>输出:</b>4\n<b>解释:</b>平方和三元组为 (3,4,5),(4,3,5),(6,8,10) 和 (8,6,10) 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 250</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 9,
|
||||
"likes": 11,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"7.2K\", \"totalSubmission\": \"10.4K\", \"totalAcceptedRaw\": 7204, \"totalSubmissionRaw\": 10374, \"acRate\": \"69.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"7.7K\", \"totalSubmission\": \"11.1K\", \"totalAcceptedRaw\": 7704, \"totalSubmissionRaw\": 11101, \"acRate\": \"69.4%\"}",
|
||||
"hints": [
|
||||
"Iterate over all possible pairs (a,b) and check that the square root of a * a + b * b is an integers less than or equal n",
|
||||
"You can check that the square root of an integer is an integer using binary seach or a builtin function like sqrt"
|
||||
|
Reference in New Issue
Block a user