Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: samsenpisardmoo26

Problemset: อนุกรม

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-06 23:45:32

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    
    long long a=1, b=1;
    long long c;
    
    for(int i=0; i<n-2; i++)
    {
        c = a+b;
        a = b;
        b = c;
    }
    
    cout << c;
}