mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 23:08:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你两个整数,<code>n</code> 和 <code>start</code> 。</p>\n\n<p>数组 <code>nums</code> 定义为:<code>nums[i] = start + 2*i</code>(下标从 0 开始)且 <code>n == nums.length</code> 。</p>\n\n<p>请返回 <code>nums</code> 中所有元素按位异或(<strong>XOR</strong>)后得到的结果。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>n = 5, start = 0\n<strong>输出:</strong>8\n<strong>解释:</strong>数组 nums 为 [0, 2, 4, 6, 8],其中 (0 ^ 2 ^ 4 ^ 6 ^ 8) = 8 。\n "^" 为按位异或 XOR 运算符。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>n = 4, start = 3\n<strong>输出:</strong>8\n<strong>解释:</strong>数组 nums 为 [3, 5, 7, 9],其中 (3 ^ 5 ^ 7 ^ 9) = 8.</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>n = 1, start = 7\n<strong>输出:</strong>7\n</pre>\n\n<p><strong>示例 4:</strong></p>\n\n<pre><strong>输入:</strong>n = 10, start = 5\n<strong>输出:</strong>2\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 1000</code></li>\n\t<li><code>0 <= start <= 1000</code></li>\n\t<li><code>n == nums.length</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 103,
|
||||
"likes": 105,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"73.9K\", \"totalSubmission\": \"86.2K\", \"totalAcceptedRaw\": 73941, \"totalSubmissionRaw\": 86230, \"acRate\": \"85.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"74.6K\", \"totalSubmission\": \"87K\", \"totalAcceptedRaw\": 74582, \"totalSubmissionRaw\": 86968, \"acRate\": \"85.8%\"}",
|
||||
"hints": [
|
||||
"Simulate the process, create an array nums and return the Bitwise XOR of all elements of it."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user