1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 21:46:46 +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> 是一个字符串,组成它的数字可以形成累加序列。</p>\n\n<p>一个有效的 <strong>累加序列</strong> 必须<strong> 至少 </strong>包含 3 个数。除了最开始的两个数以外,序列中的每个后续数字必须是它之前两个数字之和。</p>\n\n<p>给你一个只包含数字&nbsp;<code>'0'-'9'</code>&nbsp;的字符串,编写一个算法来判断给定输入是否是 <strong>累加数</strong> 。如果是,返回 <code>true</code> ;否则,返回 <code>false</code> 。</p>\n\n<p><strong>说明:</strong>累加序列里的数,除数字 0 之外,<strong>不会</strong> 以 0 开头,所以不会出现&nbsp;<code>1, 2, 03</code> 或者&nbsp;<code>1, 02, 3</code>&nbsp;的情况。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong><code>\"112358\"</code>\n<strong>输出:</strong>true \n<strong>解释:</strong>累加序列为: <code>1, 1, 2, 3, 5, 8 </code>。1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5, 3 + 5 = 8\n</pre>\n\n<p><strong>示例&nbsp;2</strong></p>\n\n<pre>\n<strong>输入<code></code></strong><code>\"199100199\"</code>\n<strong>输出:</strong>true \n<strong>解释:</strong>累加序列为: <code>1, 99, 100, 199。</code>1 + 99 = 100, 99 + 100 = 199</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= num.length &lt;= 35</code></li>\n\t<li><code>num</code> 仅由数字(<code>0</code> - <code>9</code>)组成</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>进阶:</strong>你计划如何处理由过大的整数输入导致的溢出?</p>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 346,
"likes": 350,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Split Array into Fibonacci Sequence\", \"titleSlug\": \"split-array-into-fibonacci-sequence\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5c06\\u6570\\u7ec4\\u62c6\\u5206\\u6210\\u6590\\u6ce2\\u90a3\\u5951\\u5e8f\\u5217\"}]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"40.5K\", \"totalSubmission\": \"106.1K\", \"totalAcceptedRaw\": 40540, \"totalSubmissionRaw\": 106085, \"acRate\": \"38.2%\"}",
"stats": "{\"totalAccepted\": \"41.4K\", \"totalSubmission\": \"108.2K\", \"totalAcceptedRaw\": 41358, \"totalSubmissionRaw\": 108195, \"acRate\": \"38.2%\"}",
"hints": [],
"solution": null,
"status": null,