mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-08 17:01:42 +08:00
update
This commit is contained in:
@@ -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 <= 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,以此类推。",
|
||||
|
Reference in New Issue
Block a user