mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>你写下了若干 <strong>正整数</strong> ,并将它们连接成了一个字符串 <code>num</code> 。但是你忘记给这些数字之间加逗号了。你只记得这一列数字是 <strong>非递减</strong> 的且 <strong>没有</strong> 任何数字有前导 0 。</p>\n\n<p>请你返回有多少种可能的 <strong>正整数数组</strong> 可以得到字符串 <code>num</code> 。由于答案可能很大,将结果对 <code>10<sup>9</sup> + 7</code> <b>取余</b> 后返回。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><b>输入:</b>num = \"327\"\n<b>输出:</b>2\n<b>解释:</b>以下为可能的方案:\n3, 27\n327\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><b>输入:</b>num = \"094\"\n<b>输出:</b>0\n<b>解释:</b>不能有数字有前导 0 ,且所有数字均为正数。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><b>输入:</b>num = \"0\"\n<b>输出:</b>0\n<strong>解释:</strong>不能有数字有前导 0 ,且所有数字均为正数。\n</pre>\n\n<p><strong>示例 4:</strong></p>\n\n<pre><b>输入:</b>num = \"9999999999999\"\n<b>输出:</b>101\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= num.length <= 3500</code></li>\n\t<li><code>num</code> 只含有数字 <code>'0'</code> 到 <code>'9'</code> 。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 17,
|
||||
"likes": 23,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"989\", \"totalSubmission\": \"3.7K\", \"totalAcceptedRaw\": 989, \"totalSubmissionRaw\": 3704, \"acRate\": \"26.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"1K\", \"totalSubmission\": \"3.8K\", \"totalAcceptedRaw\": 1022, \"totalSubmissionRaw\": 3819, \"acRate\": \"26.8%\"}",
|
||||
"hints": [
|
||||
"If we know the current number has d digits, how many digits can the previous number have?",
|
||||
"Is there a quick way of calculating the number of possibilities for the previous number if we know that it must have less than or equal to d digits? Try to do some pre-processing."
|
||||
|
Reference in New Issue
Block a user