143 不用额外变量交换两个整数的值
Table of Contents

ac

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static Scanner sc = new Scanner(System.in);

    public static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static long mod = (long)Math.pow(2,29);

    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();

        // 利用异或的性质,如果 n ^ m = n ^ m
        // 则
        // n = m ^ (n ^ m)
        // m = n ^ (n ^ m)
        n = n ^ m;
        m = m ^ n; // m 设置为等于 n 了
        n = m ^ n; // n 设置为等于 m 了

        System.out.println(n + " " + m);
    }


}
/*

*/