1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 15:01:40 +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>你写下了若干 <strong>正整数</strong>&nbsp;,并将它们连接成了一个字符串&nbsp;<code>num</code>&nbsp;。但是你忘记给这些数字之间加逗号了。你只记得这一列数字是 <strong>非递减</strong>&nbsp;的且&nbsp;<strong>没有</strong> 任何数字有前导 0 。</p>\n\n<p>请你返回有多少种可能的 <strong>正整数数组</strong>&nbsp;可以得到字符串&nbsp;<code>num</code>&nbsp;。由于答案可能很大,将结果对 <code>10<sup>9</sup> + 7</code>&nbsp;<b>取余</b>&nbsp;后返回。</p>\n\n<p>&nbsp;</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>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= num.length &lt;= 3500</code></li>\n\t<li><code>num</code>&nbsp;只含有数字&nbsp;<code>'0'</code> 到&nbsp;<code>'9'</code>&nbsp;。</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."