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