Submission
Status:
PPPPP-----
Subtask/Task Score:
50/100
Score: 50
User: speed_coding
Problemset: อนุกรม
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-29 19:09:11
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a = 0, b = 1;
for (int i = 1; i <= n; i++) {
int c = a + b;
a = b;
b = c;
}
cout << a << "\n";
return 0;
}