Files
python/LuoGu/RuMen/P1726.cpp

20 lines
280 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, i;
double f[50];
f[0] = 0;
f[1] = 1;
f[2] = 1;
cin >> n;
for (i = 3; i <= n; i++)
f[i] = f[i - 1] + f[i - 2];
printf("%0.2lf", f[n]);
return 0;
}