1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-02 14:12:17 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>颠倒给定的 32 位无符号整数的二进制位。</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>请注意,在某些语言(如 Java没有无符号整数类型。在这种情况下输入和输出都将被指定为有符号整数类型并且不应影响您的实现因为无论整数是有符号的还是无符号的其内部的二进制表示形式都是相同的。</li>\n\t<li>在 Java 中,编译器使用<a href=\"https://baike.baidu.com/item/二进制补码/5295284\" target=\"_blank\">二进制补码</a>记法来表示有符号整数。因此,在 <strong>示例 2</strong>&nbsp;中,输入表示有符号整数 <code>-3</code>,输出表示有符号整数 <code>-1073741825</code>。</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 00000010100101000001111010011100\n<strong>输出:</strong>964176192 (00111001011110000010100101000000)\n<strong>解释:</strong>输入的二进制串 <strong>00000010100101000001111010011100 </strong>表示无符号整数<strong> 43261596</strong><strong>\n </strong> 因此返回 964176192其二进制表示形式为 <strong>00111001011110000010100101000000</strong>。</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 11111111111111111111111111111101\n<strong>输出:</strong>3221225471 (10111111111111111111111111111111)\n<strong>解释:</strong>输入的二进制串 <strong>11111111111111111111111111111101</strong> 表示无符号整数 4294967293\n &nbsp; 因此返回 3221225471 其二进制表示形式为 <strong>10111111111111111111111111111111 。</strong></pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>输入是一个长度为 <code>32</code> 的二进制字符串</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>进阶</strong>: 如果多次调用这个函数,你将如何优化你的算法?</p>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 514,
"likes": 524,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Reverse Integer\", \"titleSlug\": \"reverse-integer\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6574\\u6570\\u53cd\\u8f6c\"}, {\"title\": \"Number of 1 Bits\", \"titleSlug\": \"number-of-1-bits\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u4f4d1\\u7684\\u4e2a\\u6570\"}]",
@@ -125,7 +125,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"160.4K\", \"totalSubmission\": \"226.7K\", \"totalAcceptedRaw\": 160369, \"totalSubmissionRaw\": 226698, \"acRate\": \"70.7%\"}",
"stats": "{\"totalAccepted\": \"165.5K\", \"totalSubmission\": \"233.4K\", \"totalAcceptedRaw\": 165527, \"totalSubmissionRaw\": 233449, \"acRate\": \"70.9%\"}",
"hints": [],
"solution": null,
"status": null,