4 solutions

  • 1
    @ 2023-7-31 14:45:38
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
    int a=0,b=0,head=0,foot=0;
        cin>>head>>foot;
        b=(foot-head*2)/2;
        //a=(head*4-foot)/2;
        a=head-b;
        cout<<a<<" "<<b<<endl;
        return 0;
    }
    

    Information

    ID
    232
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    7
    Tags
    # Submissions
    167
    Accepted
    44
    Uploaded By