Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: solarsunny
Problemset: อนุกรม
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-28 18:19:22
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n=0;
cin >> n;
long long a=1;
long long b=1;
long long s=1;
for(int i=0; i<n-2; i++) {
s = a+b;
a = b;
b = s;
}
cout << s << endl;
}