4 solutions

  • 4
    @ 2024-11-14 20:23:47

    智障版本:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        char a; cin>>a; if(a == 'Z') { a = 'B'; } else if(a == 'Y') { a = 'A'; } else { a = a + 2; } cout<<a; return 0;
    }
    

    正常版本:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        char a;
        cin>>a;
        if(a == 'Z')
        {
            a='B';
        }
        else if(a == 'Y')
        {
            a='A';
        }
        else
        {
            a=a+2;
        }
        cout<<a;
        return 0;
    }
    

    Information

    ID
    17
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    2
    Tags
    (None)
    # Submissions
    216
    Accepted
    69
    Uploaded By