1 solutions

  • 0
    @ 2023-8-3 14:11:50
    #include <bits/stdc++.h>
    using namespace std;
    
    int main()
    {
        int a=0,b=0;
        char c=0;
        cin>>a>>c;
        b=8;
        a=a-1000;
        if(a>0)
        {
            b=b+(a/500)*4;
            if(a%500>0)
            {
                b=b+4;
            }
    
        }
        if(c=='y')
        {
            b=b+5;
        }
        cout<<b<<endl;
        return 0;
    }
    

    Information

    ID
    552
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    8
    Tags
    # Submissions
    112
    Accepted
    27
    Uploaded By