A - スワップ / AtCoderBeginnerContest#012
#include <algorithm> #include <iostream> using namespace std; void Solve(int a, int b) { swap(a,b); cout << a << " " << b << endl; } int main(void) { int a, b; cin >> a >> b; Solve(a,b); return 0; }
swapでaの値とbの値を入れ替え出力。
~了~