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>date</code>&nbsp;,它的格式为&nbsp;<code>Day Month Year</code>&nbsp;,其中:</p>\n\n<ul>\n\t<li><code>Day</code>&nbsp;是集合&nbsp;<code>{&quot;1st&quot;, &quot;2nd&quot;, &quot;3rd&quot;, &quot;4th&quot;, ..., &quot;30th&quot;, &quot;31st&quot;}</code>&nbsp;中的一个元素。</li>\n\t<li><code>Month</code>&nbsp;是集合&nbsp;<code>{&quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;, &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot;}</code>&nbsp;中的一个元素。</li>\n\t<li><code>Year</code>&nbsp;的范围在 <code>[1900, 2100]</code>&nbsp;之间。</li>\n</ul>\n\n<p>请你将字符串转变为&nbsp;<code>YYYY-MM-DD</code>&nbsp;的格式,其中:</p>\n\n<ul>\n\t<li><code>YYYY</code>&nbsp;表示 4 位的年份。</li>\n\t<li><code>MM</code>&nbsp;表示 2 位的月份。</li>\n\t<li><code>DD</code>&nbsp;表示 2 位的天数。</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>date = &quot;20th Oct 2052&quot;\n<strong>输出:</strong>&quot;2052-10-20&quot;\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>date = &quot;6th Jun 1933&quot;\n<strong>输出:</strong>&quot;1933-06-06&quot;\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre><strong>输入:</strong>date = &quot;26th May 1960&quot;\n<strong>输出:</strong>&quot;1960-05-26&quot;\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>给定日期保证是合法的,所以不需要处理异常输入。</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 14,
"likes": 15,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"11.5K\", \"totalSubmission\": \"19.5K\", \"totalAcceptedRaw\": 11489, \"totalSubmissionRaw\": 19503, \"acRate\": \"58.9%\"}",
"stats": "{\"totalAccepted\": \"11.8K\", \"totalSubmission\": \"20K\", \"totalAcceptedRaw\": 11760, \"totalSubmissionRaw\": 19952, \"acRate\": \"58.9%\"}",
"hints": [
"Handle the conversions of day, month and year separately.",
"Notice that days always have a two-word ending, so if you erase the last two characters of this days you'll get the number."