1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21: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>泰波那契序列&nbsp;T<sub>n</sub>&nbsp;定义如下:&nbsp;</p>\n\n<p>T<sub>0</sub> = 0, T<sub>1</sub> = 1, T<sub>2</sub> = 1, 且在 n &gt;= 0&nbsp;的条件下 T<sub>n+3</sub> = T<sub>n</sub> + T<sub>n+1</sub> + T<sub>n+2</sub></p>\n\n<p>给你整数&nbsp;<code>n</code>,请返回第 n 个泰波那契数&nbsp;T<sub>n </sub>的值。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>n = 4\n<strong>输出:</strong>4\n<strong>解释:</strong>\nT_3 = 0 + 1 + 1 = 2\nT_4 = 1 + 1 + 2 = 4\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>n = 25\n<strong>输出:</strong>1389537\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>0 &lt;= n &lt;= 37</code></li>\n\t<li>答案保证是一个 32 位整数,即&nbsp;<code>answer &lt;= 2^31 - 1</code>。</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 198,
"likes": 200,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Climbing Stairs\", \"titleSlug\": \"climbing-stairs\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u722c\\u697c\\u68af\"}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"118.5K\", \"totalSubmission\": \"195.1K\", \"totalAcceptedRaw\": 118529, \"totalSubmissionRaw\": 195070, \"acRate\": \"60.8%\"}",
"stats": "{\"totalAccepted\": \"122.4K\", \"totalSubmission\": \"201.3K\", \"totalAcceptedRaw\": 122370, \"totalSubmissionRaw\": 201318, \"acRate\": \"60.8%\"}",
"hints": [
"Make an array F of length 38, and set F[0] = 0, F[1] = F[2] = 1.",
"Now write a loop where you set F[n+3] = F[n] + F[n+1] + F[n+2], and return F[n]."