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;
    }
    
    • 0
      @ 2025-3-17 18:29:33
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n,m;
          cin>>n>>m;
          swap(n,m);
          cout<<n<<" "<<m;
          return 0;
      }
      
      • 1

      Information

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