1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-02 22:13:28 +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;<code>t</code>,只有在&nbsp;<code>s = t + ... + t</code><code>t</code> 自身连接 1 次或多次)时,我们才认定&nbsp;“<code>t</code> 能除尽 <code>s</code>”。</p>\n\n<p>给定两个字符串&nbsp;<code>str1</code>&nbsp;和&nbsp;<code>str2</code>&nbsp;。返回 <em>最长字符串&nbsp;<code>x</code>,要求满足&nbsp;<code>x</code> 能除尽 <code>str1</code> 且&nbsp;<code>X</code> 能除尽 <code>str2</code></em> 。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>str1 = \"ABCABC\", str2 = \"ABC\"\n<strong>输出:</strong>\"ABC\"\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>str1 = \"ABABAB\", str2 = \"ABAB\"\n<strong>输出:</strong>\"AB\"\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>str1 = \"LEET\", str2 = \"CODE\"\n<strong>输出:</strong>\"\"\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= str1.length, str2.length &lt;= 1000</code></li>\n\t<li><code>str1</code>&nbsp;和&nbsp;<code>str2</code>&nbsp;由大写英文字母组成</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 227,
"likes": 230,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"36.7K\", \"totalSubmission\": \"62.5K\", \"totalAcceptedRaw\": 36682, \"totalSubmissionRaw\": 62458, \"acRate\": \"58.7%\"}",
"stats": "{\"totalAccepted\": \"37.1K\", \"totalSubmission\": \"63.2K\", \"totalAcceptedRaw\": 37119, \"totalSubmissionRaw\": 63227, \"acRate\": \"58.7%\"}",
"hints": [
"The greatest common divisor must be a prefix of each string, so we can try all prefixes."
],