Submission

Status:

PPPPP-----

Subtask/Task Score:

50/100

Score: 50

User: yourmom

Problemset: อนุกรม

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-03 10:43:47

#include <iostream>
using namespace std;
int a,b,c,d;
int main() {
    b = 1;
    c = 1;
    d = 1;
    cin>>a;
    for(int i=1;i<a;i++){
        c = d;
        d = c + b;
        b = c;
    }
    cout<<b;
    return 0;
}