10 条题解

  • 2
    @ 2023-1-23 14:50:06
    #include<iostream>
    using namespace std;
    int main(){
    	int a,b;
    	cin>>a>>b;
    	swap(a,b);
    	cout<<a<<" "<<b;
    	return 0;
    }
    
    
    
    • 1
      @ 2025-1-17 16:33:34
      #include<stdio.h>
      #include<iostream>
      using namespace std;
      int main()
      {
      	int a,b;
      	cin>>a>>b;
      	cout<<a+b-a;
      	cout<<" ";
      	cout<<b+a-b;
       
      }
      
      • 1
        @ 2022-11-13 17:18:08
        #include <iostream>
        using namespace std;int main(){int a,b;cin>>a>>b;cout<<b<<" "<<a;return 0;}
        
      • 0
        #include<iostream>
        using namespace std;
        int main(){
        	int a,b;
        	cin>>a>>b;
        	cout<<b<<" "<<a;
        	
        } 
        
        • 0
          @ 2024-3-26 21:58:39

          #include <iostream> #include <cstdio> using namespace std; int main() { int a,b;//创建变量 cin>>a>>b;//赋值ab值 swap(a,b);//交换ab值 cout<<a<<" "<<b;//输出交换后ab值 return 0; }

          • 0
            @ 2024-3-19 20:14:16

            #include <iostream> using namespace std; int main() { int a , b , c,d; cin>>a>>b; c=a; a=b; b=c; cout<<a<<" "<<b;

            }

            • 0
              @ 2024-1-30 11:53:23
              #include<bits/stdc++.h>
              using namespace std;
              int main(){
              int a,b;
              cin>>a>>b;
              swap(a,b);//交换a和b值
              cout<<a<<" "<<b;
              }
              
              • 0
                @ 2022-10-17 17:32:33
                #include <iostream>
                using namespace std;
                int main()
                {
                  int a,b,c,d;
                  cin>>a>>b;
                  c=b;
                  d=a;
                    printf("%d %d",c,d);
                }
                
                • -2
                  @ 2022-8-10 13:23:34

                  #include <bits/stdc++.h>

                  using namespace std;

                  int main(void) { int a, b, x;

                  cin >> a >> b;
                  
                  cout << b << " " << a;
                  
                  return 0;
                  

                  }

                  • -4
                    @ 2022-1-24 9:34:47
                    #include <stdio.h>
                    #include <iostream>
                    using namespace std;
                    int main()
                    {
                    	int a,b;
                    	cin >> a >> b;
                    	cout << b << " " << a <<endl;	
                    }
                    
                    • 1

                    信息

                    ID
                    851
                    时间
                    1000ms
                    内存
                    128MiB
                    难度
                    5
                    标签
                    递交数
                    1420
                    已通过
                    597
                    上传者