#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; swap(a,b); cout<<a<<" "<<b; return 0; }
#include #include <math.h> #include <stdio.h> using namespace std; int main(){ int a,b; cin >> a >> b; swap(a,b); cout << a << " " << b; return 0; }
#include using namespace std; int main() { int a,b; cin >> a >> b; cout << b <<" "<<a; return 0; }
👍
@
#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; }
#include <iostream> using namespace std;int main(){int a,b;cin>>a>>b;cout<<b<<" "<<a;return 0;}
极简,保AC
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<b<<" "<<a; }
#include #include using namespace std; int main() { int a,b;//创建变量 cin>>a>>b;//赋值ab值 swap(a,b);//交换ab值 cout<<a<<" "<<b;//输出交换后ab值 return 0; }
#include using namespace std; int main() { int a , b , c,d; cin>>a>>b; c=a; a=b; b=c; cout<<a<<" "<<b;
}
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; swap(a,b);//交换a和b值 cout<<a<<" "<<b; }
#include <iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b; c=b; d=a; printf("%d %d",c,d); }
#include <bits/stdc++.h>
using namespace std;
int main(void) { int a, b, x;
cin >> a >> b; cout << b << " " << a; return 0;
#include <stdio.h> #include <iostream> using namespace std; int main() { int a,b; cin >> a >> b; cout << b << " " << a <<endl; }
注册一个 TeMenHu 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TeMenHu 通用账户