1 solutions

  • 0
    @ 2025-11-5 17:01:27

    C++ :

    #include<cstdio>
    #include<cctype>
    #include<cstring>
    #include<iostream>
    #include<cmath>
    #define For1( i, a, b ) for( int i = a; i <= b; i++ )
    #define For2( i, a, b ) for( int i = a; i >= b; i-- )
    using namespace std;
    
    int f[20] = { 1, 1, 1, 1, 1 };
    int main()
    {
        //freopen("in.txt", "r", stdin);
        For1( i, 5, 25 ) f[i] = f[i - 1] + f[i - 4];
        printf( "%d\n", f[25] );
        return 0;
    }
    
    
    • 1

    Information

    ID
    18160
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By