For this Question: A number is called tricky if it does not contain two adjacent 1's in its binary representation like 5 (101) 8 (100) etc. Given an integer X, your task is to print the smallest tricky number which is greater than or equal to X.The first line of input contains a single integer T denoting the number of test cases. Next T lines contain a single integer, the value of X.

Constraints:-
1 <= T <= 100000
1 <= X <= 1000000000For each test case print the smallest tricky number which is greater than or equal to X.Sample Input:-
2
6
12

Sample Output:-
8
16, 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) {
			int x = Integer.parseInt(br.readLine());
			ArrayList<Integer> arrli = new ArrayList<>();
			while(x != 0) {
				arrli.add(x & 1);
				x >>= 1;
			}

			arrli.add(0);

			int lastBit = 0;

			for(int i=1; i<arrli.size()-1; ++i) {
				if(arrli.get(i) == 1 && arrli.get(i-1) == 1 && arrli.get(i+1) != 1) {
					arrli.remove(i+1);
					arrli.add(i+1, 1);
					for(int j=i; j>=lastBit; --j){
						arrli.remove(j);
						arrli.add(j, 0);
					}

					lastBit = i+1;
				}
			}

			long ans = 0;
			for(int i=0; i<arrli.size(); ++i)
				ans += (arrli.get(i))*(1<<i);

			System.out.println(ans);
		}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?