Submission

Status:
Compilation Error

Score: 0

User: njoop

Problemset: อนุกรม

Language: cpp

Time: 0.000 second

Submitted On: 2024-11-28 22:49:25

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

int fib[1000];

int main() {
    fib[1] = 1;
    fib[2] = 1;
    int n;
    cin >> n;
    for(int i=3; i<=n; i++) {
        fib[i] = fib[i-1] + fib[i-2];
    }
    cout << fib[n];
}