mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-12-19 10:34:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个许可密钥字符串 <code>s</code>,仅由字母、数字字符和破折号组成。字符串由 <code>n</code> 个破折号分成 <code>n + 1</code> 组。你也会得到一个整数 <code>k</code> 。</p>\n\n<p>我们想要重新格式化字符串 <code>s</code>,使每一组包含 <code>k</code> 个字符,除了第一组,它可以比 <code>k</code> 短,但仍然必须包含至少一个字符。此外,两组之间必须插入破折号,并且应该将所有小写字母转换为大写字母。</p>\n\n<p>返回 <em>重新格式化的许可密钥</em> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>S = \"5F3Z-2e-9-w\", k = 4\n<strong>输出:</strong>\"5F3Z-2E9W\"\n<strong>解释:</strong>字符串 S 被分成了两个部分,每部分 4 个字符;\n 注意,两个额外的破折号需要删掉。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>S = \"2-5g-3-J\", k = 2\n<strong>输出:</strong>\"2-5G-3J\"\n<strong>解释:</strong>字符串 S 被分成了 3 个部分,按照前面的规则描述,第一部分的字符可以少于给定的数量,其余部分皆为 2 个字符。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s</code> 只包含字母、数字和破折号 <code>'-'</code>.</li>\n\t<li><code>1 <= k <= 10<sup>4</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 136,
|
||||
"likes": 137,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"45.3K\", \"totalSubmission\": \"96.1K\", \"totalAcceptedRaw\": 45271, \"totalSubmissionRaw\": 96096, \"acRate\": \"47.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"46.1K\", \"totalSubmission\": \"98K\", \"totalAcceptedRaw\": 46139, \"totalSubmissionRaw\": 98008, \"acRate\": \"47.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user