游客 Signup | Login
中文 | En

3364 - 交换变量

输入两个整数a和b,试交换a和b的值

Input

输入数据只有一行为两个整数,两数之间用一个空格隔开,分别是a和b的值

Output

输出一行,为交换后a和b的值

Examples

Input

12 36

Output

36 12

Hint

题目来源:吕红波

Solution C++

#include<iostream>
#include<cstdio>
using namespace std;
int c,d;
void swap(int &c,int &d);
void swap(int &c,int &d)
{
	int t;
	t=c;
	c=d;
	d=t;
}
int main()
{
	int a,b;
	cin>>a>>b;
	swap(a,b);
	cout<<a<<' '<<b<<endl;
	return 0;
}

Hint

题目来源:吕红波

Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题