Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: GoofyGooner6767
Problemset: อนุกรม
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-30 14:17:58
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a=0,b=1,c=1,t;
cin >> n;
for(int i=0;i<n;i++){
t=b;
c+=b;
b+=a;
a=t;
}
cout << c;
}