#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
int n;
double fn = 0;
cin >> n;
fn = (pow((1 + sqrt(5)) / 2, n) - pow((1 - sqrt(5)) / 2, n)) / sqrt(5);
cout << fixed << setprecision(2) << fn << endl;
return 0;
}
直接带入公式就过了,怎么题解里都在用递归