Submission
Status:
PPPPPTTTTT
Subtask/Task Score:
50/100
Score: 50
User: fillhavertz
Problemset: อนุกรม
Language: cpp
Time: 1.098 second
Submitted On: 2025-10-07 00:35:01
#include <iostream>
using namespace std;
int patt(int p){
if(p==0) return 0;
else if(p==1) return 1;
else return patt(p-1)+patt(p-2);
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin>>n;
cout<<patt(n);
return 0;
}