Submission

Status:

PPPPP-----

Subtask/Task Score:

50/100

Score: 50

User: theem1502

Problemset: อนุกรม

Language: c

Time: 0.004 second

Submitted On: 2025-09-11 20:07:45

#include <stdio.h>

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