题解 | #斐波那契数列#
斐波那契数列
https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3
int Fibonacci(int n ) { // write code here int f = 0, g = 1; while(n--){ f = f + g; g = f - g; } return f; }
斐波那契数列
https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3
int Fibonacci(int n ) { // write code here int f = 0, g = 1; while(n--){ f = f + g; g = f - g; } return f; }
相关推荐