For this Question: You are given a decimal number n. You need to find the gray code of the number n and convert it into decimal.

Binary to Gray conversion :
1. The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given binary code.
2. Other bits of the output gray code can be obtained by XORing binary code bit at that index and previous index.

Eg: Gray code of 01001 is 01101The first line contains an integer T, the number of test cases. For each test case, there is an integer N denoting the number.

<b>Constraints</b>
1 <= T <= 100
1 <= N <= 10^9For each test case, print gray code equivalent of N in a separate line.Sample Input:
4
10
13
5
101

Sample Output:
15
11
7
87

Explanation:
5: 101 in binary
Gray: 111, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int t = Integer.parseInt(br.readLine());

		while(t-- > 0) {
			long n = Long.parseLong(br.readLine());
			System.out.println(greyCode(n));
		}
	}
	static long greyCode(long n) {
		return n ^ (n>>1);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?