1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-24 22:38:57 +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>给定两个字符串&nbsp;<code>s</code>&nbsp;和&nbsp;<code>t</code>&nbsp;,每个字符串代表一个非负有理数,只有当它们表示相同的数字时才返回 <code>true</code>&nbsp;。字符串中可以使用括号来表示有理数的重复部分。</p>\n\n<p><strong>有理数</strong>&nbsp;最多可以用三个部分来表示:<em>整数部分</em>&nbsp;<code>&lt;IntegerPart&gt;</code>、<em>小数非重复部分</em>&nbsp;<code>&lt;NonRepeatingPart&gt;</code>&nbsp;和<em>小数重复部分</em>&nbsp;<code>&lt;(&gt;&lt;RepeatingPart&gt;&lt;)&gt;</code>。数字可以用以下三种方法之一来表示:</p>\n\n<ul>\n\t<li><code>&lt;IntegerPart&gt;</code>&nbsp;\n\n\t<ul>\n\t\t<li>例:&nbsp;<code>0</code>&nbsp;,<code>12</code>&nbsp;和&nbsp;<code>123</code>&nbsp;</li>\n\t</ul>\n\t</li>\n\t<li><code>&lt;IntegerPart&gt;&lt;.&gt;&lt;NonRepeatingPart&gt;</code>\n\t<ul>\n\t\t<li>例: <code>0.5<font color=\"#333333\"><font face=\"Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"font-size:14px\"><span style=\"background-color:#ffffff\">&nbsp;, </span></span></font></font></code><font color=\"#333333\"><font face=\"Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"font-size:14px\"><span style=\"background-color:#ffffff\"><code>1.</code>&nbsp;,&nbsp;</span></span></font></font><code>2.12</code>&nbsp;和&nbsp;<code>123.0001</code></li>\n\t</ul>\n\t</li>\n\t<li><code>&lt;IntegerPart&gt;&lt;.&gt;&lt;NonRepeatingPart&gt;&lt;(&gt;&lt;RepeatingPart&gt;&lt;)&gt;</code>&nbsp;\n\t<ul>\n\t\t<li>例: <code>0.1(6)</code> <code>1.(9)</code> <code>123.00(1212)</code></li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>十进制展开的重复部分通常在一对圆括号内表示。例如:</p>\n\n<ul>\n\t<li><code>1 / 6 = 0.16666666... = 0.1(6) = 0.1666(6) = 0.166(66)</code></li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"0.(52)\", t = \"0.5(25)\"\n<strong>输出:</strong>true\n<strong>解释:</strong>因为 \"0.(52)\" 代表 0.52525252...,而 \"0.5(25)\" 代表 0.52525252525.....,则这两个字符串表示相同的数字。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"0.1666(6)\", t = \"0.166(66)\"\n<strong>输出:</strong>true\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"0.9(9)\", t = \"1.\"\n<strong>输出:</strong>true\n<strong>解释:</strong>\"0.9(9)\" 代表 0.999999999... 永远重复,等于 1 。[<a href=\"https://baike.baidu.com/item/0.999…/5615429?fr=aladdin\" target=\"_blank\">有关说明,请参阅此链接</a>]\n\"1.\" 表示数字 1其格式正确(IntegerPart) = \"1\" 且 (NonRepeatingPart) = \"\" 。</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>每个部分仅由数字组成。</li>\n\t<li>整数部分&nbsp;<code>&lt;IntegerPart&gt;</code>&nbsp;不会以零开头。(零本身除外)</li>\n\t<li><code>1 &lt;= &lt;IntegerPart&gt;.length &lt;= 4 </code></li>\n\t<li><code>0 &lt;= &lt;NonRepeatingPart&gt;.length &lt;= 4 </code></li>\n\t<li><code>1 &lt;= &lt;RepeatingPart&gt;.length &lt;= 4 </code></li>\n</ul>\n<span style=\"display:block\"><span style=\"height:0px\"><span style=\"position:absolute\"></span></span></span>",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 20,
"likes": 21,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"1.5K\", \"totalSubmission\": \"3.8K\", \"totalAcceptedRaw\": 1531, \"totalSubmissionRaw\": 3794, \"acRate\": \"40.4%\"}",
"stats": "{\"totalAccepted\": \"1.6K\", \"totalSubmission\": \"3.9K\", \"totalAcceptedRaw\": 1580, \"totalSubmissionRaw\": 3896, \"acRate\": \"40.6%\"}",
"hints": [],
"solution": {
"id": "113",