This is a funny question for me, so I list three methods to solve it.
1.
#include
using namespace std;
int main()
{
int i, j;
cin >> i >> j;
i ^= j;
j ^= i;
i ^= j;
cout << i << j;
return 0;
}
2.
#include
using namespace std;
int main()
{
int i, j;
cin >> i >> j;
i = i + j;
j = i - j;
i = i - j;
cout << i << j;
return 0;
}
3.
#include
using namespace std;
int main()
{
int i, j;
cin >> i >> j;
i = i + j - (j = i);
cout << i << j;
return 0;
}
阅读(768) | 评论(0) | 转发(0) |