Submission
Status:
-PPPP-----
Subtask/Task Score:
40/100
Score: 40
User: Darleneee93
Problemset: อนุกรม
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-07 10:04:20
#include <bits/stdc++.h>
using namespace std;
int main(){
int num;
cin >> num;
int a=0 ,b=1;
long long c;
if (num > 90){
return 1;
}
if (num == 1){
cout << "1";
}
if (num ==0){
cout << "0";
}
for (int i=1;i < num;i++){
c=a+b;
a=b;
b=c;
}
cout << c << endl;
}