Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: NovemNotes

Problemset: อนุกรม

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-01 14:37:41

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

#define int long long
int f[101];

int32_t main(){
    // ios_base::sync_with_stdio(false);cin.tie(NULL);
    cin.tie(0)->sync_with_stdio(0);
    int n;cin >> n;
    f[1]=1;
    for(int i=2;i<=n;i++)f[i]=f[i-1]+f[i-2];
    cout << f[n] << "\n";
    return 0;
}
/*
base f[0] = 0,f[1]=1;
*/