Submission

Status:

PPPPP-----

Subtask/Task Score:

50/100

Score: 50

User: eefirefire

Problemset: อนุกรม

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-03 19:04:08

#include <bits/stdc++.h>

using namespace std;

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

    int a = 1; int b = 1;

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

    cout << b;
}