#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int f[25];
int main()
{
int n;
cin >> n;
f[0] = 1; f[1] = 1;
for (int i = 2; i <= n; i ++ )
f[i] = f[i - 2] + f[i - 1];
cout << f[n];
return 0;
}
acwing821跳台阶
最新推荐文章于 2024-08-14 17:18:35 发布