2 solutions

  • 2
    @ 2025-1-23 15:02:13

    f1:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int a,b;
        cin>>a>>b;
        swap(a,b);
        cout<<a<<" "<<b;
        return 0;
    }
    

    f2:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int a,b;
        cin>>a>>b;
        cout<<b<<" "<<a;
        return 0;
    }
    

    f3:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int a,b,c;
        cin>>a>>b;
        c=a;
        a=b;
        b=c;
        cout<<a<<" "<<b;
        return 0;
    }
    

    Information

    ID
    9
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    195
    Accepted
    79
    Uploaded By