2TLE,2WA,1MLE
查看原帖
2TLE,2WA,1MLE
1645410
lyya楼主2025/7/23 09:52
#include <bits/stdc++.h>
using namespace std;
long long f(int n)
{
    if(n == 1||n == 2)
    {
        return 1;
    }
    return f(n - 1) + f(n - 2);
}
int main()
{
    int n;
    cin >> n;
    cout << fixed<<setprecision(2)<<f(n);
    return 0;
}
2025/7/23 09:52
加载中...