1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-08 17:01:42 +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>编写一个方法,计算从 0 到 n (含 n) 中数字 2 出现的次数。</p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入: </strong>25\n<strong>输出: </strong>9\n<strong>解释: </strong>(2, 12, 20, 21, 22, 23, 24, 25)(注意 22 应该算作两次)</pre>\n\n<p>提示:</p>\n\n<ul>\n\t<li><code>n &lt;= 10^9</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 48,
"likes": 49,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"5.6K\", \"totalSubmission\": \"12.3K\", \"totalAcceptedRaw\": 5598, \"totalSubmissionRaw\": 12275, \"acRate\": \"45.6%\"}",
"stats": "{\"totalAccepted\": \"5.8K\", \"totalSubmission\": \"12.7K\", \"totalAcceptedRaw\": 5816, \"totalSubmissionRaw\": 12690, \"acRate\": \"45.8%\"}",
"hints": [
"从蛮力解法开始。",
"不要计算每一个数中有多少个2要一位数一位数地想也就是说首先计算(对于每个数字)第 1 位中有多少个 2然后计算(对于每个数字)第 2 位中有多少个 2再计算(对于每个数字)第 3 位中有多少个 2以此类推。",