For this Question: You are given an array A, you need to create an array B such that B(i) is the Xor of all the elements of A except A(i).The first line of the input contains an integer N, the number of elements in array A.
The second line of input contains N singly spaced integers, the elements of the array A.

Constraints
1 <= N <= 300000
0 <= A(i) <= 1000000000Output the required array B.Sample Input
4
3 5 7 6

Sample Output
4 2 0 1

Explanation:
B(0) = 5^7^6 = 4
B(1) = 3^7^6 = 2
B(2) = 3^5^6 = 0
B(3) = 3^5^7 = 1, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void cal(long arr[], int n){
        long xor = 0;
        for(int i = 0; i < arr.length; i++) {
            xor = xor ^ arr[i];
        }
        for(int i = 0; i < arr.length; i++) {
            long temp = xor ^ arr[i];
            System.out.print(temp+" ");
        }
	}
	public static void main (String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String nD = br.readLine();
		String nDArr[] = nD.split(" ");
		int n = Integer.parseInt(nDArr[0]);
		long arr[]= new long[n];
		String input = br.readLine();
		String sar[] = input.split(" ");
		for(int i = 0; i < n; i++){
			arr[i] = Long.parseLong(sar[i]);
		}
		cal(arr, n);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?