mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 14:58:56 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>列表 <code>arr</code> 由在范围 <code>[1, n]</code> 中的所有整数组成,并按严格递增排序。请你对 <code>arr</code> 应用下述算法:</p>\n\n<div class=\"original__bRMd\">\n<div>\n<ul>\n\t<li>从左到右,删除第一个数字,然后每隔一个数字删除一个,直到到达列表末尾。</li>\n\t<li>重复上面的步骤,但这次是从右到左。也就是,删除最右侧的数字,然后剩下的数字每隔一个删除一个。</li>\n\t<li>不断重复这两步,从左到右和从右到左交替进行,直到只剩下一个数字。</li>\n</ul>\n\n<p>给你整数 <code>n</code> ,返回 <code>arr</code> 最后剩下的数字。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 9\n<strong>输出:</strong>6\n<strong>解释:</strong>\narr = [<strong><em>1</em></strong>, 2, <em><strong>3</strong></em>, 4, <em><strong>5</strong></em>, 6, <em><strong>7</strong></em>, 8, <em><strong>9</strong></em>]\narr = [2, <em><strong>4</strong></em>, 6, <em><strong>8</strong></em>]\narr = [<em><strong>2</strong></em>, 6]\narr = [6]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 1\n<strong>输出:</strong>1\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 10<sup>9</sup></code></li>\n</ul>\n</div>\n</div>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 273,
|
||||
"likes": 277,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"31K\", \"totalSubmission\": \"50.8K\", \"totalAcceptedRaw\": 30957, \"totalSubmissionRaw\": 50812, \"acRate\": \"60.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"31.3K\", \"totalSubmission\": \"51.4K\", \"totalAcceptedRaw\": 31320, \"totalSubmissionRaw\": 51397, \"acRate\": \"60.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user