Untitled
unknown
plain_text
a year ago
506 B
7
Indexable
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long int llint;
typedef unsigned long long int ullint;
llint Fibo(int N)
{
if (N == 0 || N == 1)
{
return N;
}
return Fibo(N - 1) + Fibo(N - 2);
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
// cin >> t;
while (t--)
{
int N;
cin >> N;
cout << Fibo(N) << endl;
}
return 0;
}Editor is loading...
Leave a Comment