首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
leetcode509
】的更多相关文章
[Swift]LeetCode509. 斐波那契数 | Fibonacci Number
The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0and 1. That is, F(0) = 0, F(1) = 1 F(N) = F(N - 1) + F(N - 2), for N > 1. Given …
leetcode509
public class Solution { public int Fib(int N) { ) { ; } ) { ; } else { List<int> list = new List<int>(); list.Add(); list.Add(); ; i <= N; i++) { list.Add(list[i - ] + list[i - ]); } return list[N]; } } }…