1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-21 13:06:47 +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>给定一个非负整数 <code>num</code>,反复将各个位上的数字相加,直到结果为一位数。返回这个结果。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> num =<strong> </strong><code>38</code>\n<strong>输出:</strong> 2 \n<strong>解释: </strong>各位相加的过程为<strong>\n</strong>38 --&gt; 3 + 8 --&gt; 11\n11 --&gt; 1 + 1 --&gt; 2\n由于&nbsp;<code>2</code> 是一位数,所以返回 2。\n</pre>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> num =<strong> </strong>0\n<strong>输出:</strong> 0</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>0 &lt;= num &lt;= 2<sup>31</sup>&nbsp;- 1</code></li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>进阶:</strong>你可以不使用循环或者递归,在 <code>O(1)</code> 时间复杂度内解决这个问题吗?</p>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 505,
"likes": 509,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Happy Number\", \"titleSlug\": \"happy-number\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u5feb\\u4e50\\u6570\"}, {\"title\": \"Sum of Digits in the Minimum Number\", \"titleSlug\": \"sum-of-digits-in-the-minimum-number\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u6700\\u5c0f\\u5143\\u7d20\\u5404\\u6570\\u4f4d\\u4e4b\\u548c\"}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"132.1K\", \"totalSubmission\": \"185.9K\", \"totalAcceptedRaw\": 132094, \"totalSubmissionRaw\": 185936, \"acRate\": \"71.0%\"}",
"stats": "{\"totalAccepted\": \"134.8K\", \"totalSubmission\": \"189.8K\", \"totalAcceptedRaw\": 134817, \"totalSubmissionRaw\": 189772, \"acRate\": \"71.0%\"}",
"hints": [
"A naive implementation of the above process is trivial. Could you come up with other methods?",
"What are all the possible results?",