剑指offer-斐波那契数列 class Solution { public: int Fibonacci(int n) { if ( n == 0) return 0; if ( n == 1) return 1; int first = 0, second = 1, third = 1; for (int i = 2; i <= n; ++i) {//当然也可以只设置两个数,那么i就要从1开始遍历 third = first + second;//最后输出的数 ...