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>n</code> ,返回与它最近的回文整数(不包括自身)。如果不止一个,返回较小的那个。</p>\n\n<p>“最近的”定义为两个整数<strong>差的绝对值</strong>最小。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> n = \"123\"\n<strong>输出:</strong> \"121\"\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> n = \"1\"\n<strong>输出:</strong> \"0\"\n<strong>解释:</strong> 0 和 2是最近的回文,但我们返回最小的,也就是 0。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n.length <= 18</code></li>\n\t<li><code>n</code> 只由数字组成</li>\n\t<li><code>n</code> 不含前导 0</li>\n\t<li><code>n</code> 代表在 <code>[1, 10<sup>18</sup> - 1]</code> 范围内的整数</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 254,
|
||||
"likes": 258,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"22.6K\", \"totalSubmission\": \"74.8K\", \"totalAcceptedRaw\": 22598, \"totalSubmissionRaw\": 74797, \"acRate\": \"30.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"23K\", \"totalSubmission\": \"75.8K\", \"totalAcceptedRaw\": 23036, \"totalSubmissionRaw\": 75773, \"acRate\": \"30.4%\"}",
|
||||
"hints": [
|
||||
"Will brute force work for this problem? Think of something else.",
|
||||
"Take some examples like 1234, 999,1000, etc and check their closest palindromes. How many different cases are possible?",
|
||||
|
Reference in New Issue
Block a user