Submission
Status:
PPPPPTTTTT
Subtask/Task Score:
50/100
Score: 50
User: Gundhon
Problemset: อนุกรม
Language: cpp
Time: 1.102 second
Submitted On: 2026-10-01 21:43:52
#include <bits/stdc++.h>
using namespace std;
long long fibonacci(long long n){
if (n <= 1) return 1;
else{
return fibonacci(n-1) + fibonacci(n-2); // fibonacci formula
}
}
int main(){
long long c;
cin >> c;
bool o = true;
if(c > 90){
o = false;
}
if(o) cout << fibonacci(c-1);
return 0;
}