Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: tl.cpp
Problemset: อนุกรม
Language: cpp
Time: 0.002 second
Submitted On: 2026-07-31 23:18:11
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 110;
int n;
ll a[N];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
cin >> n;
a[1] = a[2] = 1;
for (int i = 3; i <= n; i++) {
a[i] = a[i - 1] + a[i - 2];
}
cout << a[n];
}