Files
python/TangDou/XiTi/1181.cpp

17 lines
249 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int f(int n) {
if (n == 1) return 1;
if (n == 2) return 2;
return dp(n - 1) + dp(n - 2);
}
int main() {
int N;
cin >> N;
cout << dp(N) << endl;
return 0;
}