您當前處於相容模式。某些功能在此模式下不可用。我們強烈建議在現代瀏覽器上切換為標準模式以獲得更好的體驗。 標準模式 隱藏
#include<bits/stdc++.h> using namespace std; int a; int f(int n){ if(n>2){ return f(n-2)+f(n-1); } if(n<=2){ return 1; } } int main(){ cin>>a; cout<<f(a); return 0; }
孟圣智 LV 1
註冊一個 YZOJ 通用賬戶,您就可以在我們提供的所有線上評測服務上提交程式碼、參與討論。
使用您的 YZOJ 通用賬戶