提交时间:2023-04-03 15:48:39

运行 ID: 13801

#include<bits/stdc++.h> using namespace std; int f(int x) { if(x == 1) return 1; else if(x == 2) return 2; else return f(x - 2) + f(x - 1); } int main() { int ji; while(cin >> ji) { cout << f(ji) << endl; } return 0; }