Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: theem1502

Problemset: อนุกรม

Language: c

Time: 0.001 second

Submitted On: 2025-09-11 20:09:46

#include <stdio.h>

int main() {
    int num;
    scanf("%d", &num);
    long long a = 1;
    long long b = 1;
    long long c = 1;
    long long previous;
    for (int i = 0; i < num ; i++) {
        c = a+b;
        previous = b;
        b = a;
        a = c;
    }
    printf("%lld", previous);
}