Submission

Status:

PPPPPTTTTT

Subtask/Task Score:

50/100

Score: 50

User: DoItUntilSheCameBack

Problemset: อนุกรม

Language: cpp

Time: 1.097 second

Submitted On: 2026-10-17 21:53:16

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#include <stack>
#include <climits>
#include <map>
#include <numeric>
#include <iomanip>
using namespace std;
using ll = long long;
int fibo(int n) {
    if(n == 1) {
        return 1; 
    }
    else if (n == 2) {
        return 1;
    }
    else {
        return fibo(n-1) + fibo(n-2);
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    cout << fibo(n);
    return 0;
}