标签:style color cci vector push class bsp nbsp pre
class Solution { public: int Fibonacci(int n) { if (n != 0) { vector<int> array; array.push_back(1); array.push_back(1); int k = 2; while (k < 39) { array.push_back(array[k - 1] + array[k - 2]); ++k; } return array[n-1]; } else return 0; } };
标签:style color cci vector push class bsp nbsp pre
原文地址:http://www.cnblogs.com/159269lzm/p/7260787.html