10 solutions

  • 0
    @ 2023-12-18 17:26:20

    #include<stdio.h> int fb(int x) { int t,t1=1,t2=1; if(x1) return 1; else if(x2) return 1; else { for(int i=2;i<x;i++) { t=(t1+t2)%10007; t1=t2; t2=t; } return t; } } int main() { long long m; scanf("%d",&m); printf("%d",fb(m)); return 0; }

    Information

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