class Solution { public: int Fibonacci(int n) { int f=0,g=1; while(n--) { f=f+g; int temp = g; g=f; f = temp; } return f; } };
21. 斐波那契数列
原文:https://www.cnblogs.com/make-big-money/p/12364751.html