Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: qweqwe
Problemset: อนุกรม
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-08 15:59:48
#include <bits/stdc++.h>
#define speed cin.tie(0)->sync_with_stdio(0)
#define ll long long
#define pii pair<int,int>
using namespace std;
int main(){
speed;
int n;cin >> n;
ll a1=1,a2=1;
while (n>1){
ll sum=0;
sum+=a1;sum+=a2;
a1=a2;a2=sum;n--;
}cout << a1;
return 0;
}