10 solutions

  • 0
    @ 2024-10-23 14:44:12

    #include<stdio.h> int main() { int x, y; int num[20]; num[0] = 1; num[1] = 1; scanf_s("%d",&x); for (y=1;y<=x;y++) { num[y + 1] = num[y - 1] + num[y];

    }
    printf("%d",num[x-1]);
    return 0;
    

    }

    Information

    ID
    38
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    2327
    Accepted
    309
    Uploaded By