1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<p>写一个函数,输入 <code>n</code> 求斐波那契Fibonacci数列的第 <code>n</code> 项(即 <code>F(N)</code>)。斐波那契数列的定义如下:</p>
<pre>
F(0) = 0,   F(1) = 1
F(N) = F(N - 1) + F(N - 2), 其中 N > 1.</pre>
<p>斐波那契数列由 0 和 1 开始,之后的斐波那契数就是由之前的两数相加而得出。</p>
<p>答案需要取模 1e9+71000000007如计算初始结果为1000000008请返回 1。</p>
<p> </p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>n = 2
<strong>输出:</strong>1
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>n = 5
<strong>输出:</strong>5
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 <= n <= 100</code></li>
</ul>