Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: zibozzz_23

Problemset: อนุกรม

Language: cpp

Time: 0.004 second

Submitted On: 2026-11-06 18:01:25

#include <bits/stdc++.h>
using namespace std;

#define ll long long
ll a[105];

int main(){
    int n;
    cin >> n;

    a[1] = 1; a[2] = 1;
    ll ans = 0;
    for(int i = 3; i <= n; ++i){
        a[i] = a[i-1] + a[i-2];
    }

    cout << a[n] << "\n";
}