mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 13:06:47 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给出数字 <code>N</code>,返回由若干 <code>"0"</code> 和 <code>"1"</code>组成的字符串,该字符串为 <code>N</code> 的<strong>负二进制(<code>base -2</code>)</strong>表示。</p>\n\n<p>除非字符串就是 <code>"0"</code>,否则返回的字符串中不能含有前导零。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>2\n<strong>输出:</strong>"110"\n<strong>解释:</strong>(-2) ^ 2 + (-2) ^ 1 = 2\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>3\n<strong>输出:</strong>"111"\n<strong>解释:</strong>(-2) ^ 2 + (-2) ^ 1 + (-2) ^ 0 = 3\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>4\n<strong>输出:</strong>"100"\n<strong>解释:</strong>(-2) ^ 2 = 4\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>0 <= N <= 10^9</code></li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 49,
|
||||
"likes": 50,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Encode Number\", \"titleSlug\": \"encode-number\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u52a0\\u5bc6\\u6570\\u5b57\"}]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"4.1K\", \"totalSubmission\": \"7.2K\", \"totalAcceptedRaw\": 4055, \"totalSubmissionRaw\": 7175, \"acRate\": \"56.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"4.1K\", \"totalSubmission\": \"7.2K\", \"totalAcceptedRaw\": 4060, \"totalSubmissionRaw\": 7189, \"acRate\": \"56.5%\"}",
|
||||
"hints": [
|
||||
"Figure out whether you need the ones digit placed or not, then shift by two."
|
||||
],
|
||||
|
Reference in New Issue
Block a user