您當前處於相容模式。某些功能在此模式下不可用。我們強烈建議在現代瀏覽器上切換為標準模式以獲得更好的體驗。 標準模式 隱藏

#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;
}

0 條評論

目前還沒有評論...