/** * * @param n int整型 * @return int整型 */ int Fibonacci(int n) { // write code here if(n <= 2) return 1; int a = 1, b = 1, c = 2; for(int i = 3; i <= n; i++){ c = a + b; a = b; b = c; } return c; }