Submission

Status:

PPPPP-----

Subtask/Task Score:

50/100

Score: 50

User: mrblbb

Problemset: อนุกรม

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-11 00:22:53

#include <stdio.h>

int main(){
    int n;
    scanf("%d", &n);
    int x=0, y=1, z;
    for (int i=1; i<=n; i++){
        z = x+y;
        x =y;
        y = z;
    }
    printf("%d", x);
}