Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: eefirefire

Problemset: อนุกรม

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-03 19:06:53

#include <bits/stdc++.h>

using namespace std;

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

    long long a = 1; long long b = 1;

    for(int i = 2; i < n;i++){
        long long temp = b;
        b = a + b;
        a = temp;
    }

    cout << b;
}