mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
update
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
"boundTopicId": 49299,
|
||||
"title": "Binary Number to String LCCI",
|
||||
"titleSlug": "bianry-number-to-string-lcci",
|
||||
"content": "<p>Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot be represented accurately in binary with at most 32 characters, print "ERROR".</p>\r\n\r\n<p><strong>Example1:</strong></p>\r\n\r\n<pre>\r\n<strong> Input</strong>: 0.625\r\n<strong> Output</strong>: "0.101"\r\n</pre>\r\n\r\n<p><strong>Example2:</strong></p>\r\n\r\n<pre>\r\n<strong> Input</strong>: 0.1\r\n<strong> Output</strong>: "ERROR"\r\n<strong> Note</strong>: 0.1 cannot be represented accurately in binary.\r\n</pre>\r\n\r\n<p><strong>Note: </strong></p>\r\n\r\n<ol>\r\n\t<li>This two charaters "0." should be counted into 32 characters.</li>\r\n</ol>\r\n",
|
||||
"content": "<p>Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot be represented accurately in binary with at most 32 characters, print "ERROR".</p>\r\n\r\n<p><strong>Example1:</strong></p>\r\n\r\n<pre>\r\n<strong> Input</strong>: 0.625\r\n<strong> Output</strong>: "0.101"\r\n</pre>\r\n\r\n<p><strong>Example2:</strong></p>\r\n\r\n<pre>\r\n<strong> Input</strong>: 0.1\r\n<strong> Output</strong>: "ERROR"\r\n<strong> Note</strong>: 0.1 cannot be represented accurately in binary.\r\n</pre>\r\n\r\n<p><strong>Note: </strong></p>\r\n\r\n<ul>\r\n\t<li>This two charaters "0." should be counted into 32 characters.</li>\r\n\t<li>The number of decimal places for <code>num</code> is at most 6 digits</li>\r\n</ul>\r\n",
|
||||
"translatedTitle": "二进制数转字符串",
|
||||
"translatedContent": "<p>二进制数转字符串。给定一个介于0和1之间的实数(如0.72),类型为double,打印它的二进制表达式。如果该数字无法精确地用32位以内的二进制表示,则打印“ERROR”。</p>\n\n<p><strong>示例1:</strong></p>\n\n<pre>\n<strong> 输入</strong>:0.625\n<strong> 输出</strong>:\"0.101\"\n</pre>\n\n<p><strong>示例2:</strong></p>\n\n<pre>\n<strong> 输入</strong>:0.1\n<strong> 输出</strong>:\"ERROR\"\n<strong> 提示</strong>:0.1无法被二进制准确表示\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li>32位包括输出中的\"0.\"这两位。</li>\n</ol>\n",
|
||||
"translatedContent": "<p>二进制数转字符串。给定一个介于0和1之间的实数(如0.72),类型为double,打印它的二进制表达式。如果该数字无法精确地用32位以内的二进制表示,则打印“ERROR”。</p>\n\n<p><strong>示例1:</strong></p>\n\n<pre>\n<strong> 输入</strong>:0.625\n<strong> 输出</strong>:\"0.101\"\n</pre>\n\n<p><strong>示例2:</strong></p>\n\n<pre>\n<strong> 输入</strong>:0.1\n<strong> 输出</strong>:\"ERROR\"\n<strong> 提示</strong>:0.1无法被二进制准确表示\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>32位包括输出中的 <code>\"0.\"</code> 这两位。</li>\n\t<li>题目保证输入用例的小数位数最多只有 <code>6</code> 位</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 34,
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.5K\", \"totalSubmission\": \"13.5K\", \"totalAcceptedRaw\": 9509, \"totalSubmissionRaw\": 13523, \"acRate\": \"70.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"9.5K\", \"totalSubmission\": \"13.5K\", \"totalAcceptedRaw\": 9532, \"totalSubmissionRaw\": 13549, \"acRate\": \"70.4%\"}",
|
||||
"hints": [
|
||||
"为了解决这个问题,试着想想如何用它来处理整数。",
|
||||
"像0.893这样的数字(以10为底),每个数字代表什么?那么以2为底的0.10 010中的每个数字代表什么?",
|
||||
|
||||
Reference in New Issue
Block a user