#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로 제공되는 모든 OJ를 이용하고 참여하실 수 있습니다.
YZOJ 공용 계정을 사용