For this Question: Given an array of N integers. You are also given an integer K. 

Find the XOR of K<sup>th</sup> bit from the right in binary representation of all numbers.

(See example for more understanding).First line contains N and K.
Next line contains N space separated integers.

<b>constraints</b>
1 &le; N &le; 10<sup>5</sup>
1 &le; K &le; 50
1 &le; arr[i] &le; 10<sup>18</sup>Output 0 or 1, denoting XOR of all bits at k<sup>th</sup> position from right.Input:
4 3
12 8 5 3

Output:
0

Explanation:
12 => 1100 => 3rd bit from right = 1
8 => 1000 => 3rd bit from right = 0
5 => 0101 => 3rd bit from right = 1
3 => 0011=> 3rd bit from right = 0
XOR = 1 ^ 0 ^ 1 ^ 0 = 0, I have written this Solution Code: import java.io.*;
import java.util.*;



public class Main {
   public static int kthBit(long x,int k){
       while(k>1){
           x >>= 1;
           k--;
       }
       return (int)x&1;
   }
    public static void main(String[] args) {
        
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        
        int n=Integer.parseInt(in.next());
        int k=Integer.parseInt(in.next());
        int ans=0;
        for(int i=0;i<n;i++){
            long x = Long.parseLong(in.next());
            ans ^= kthBit(x,k);
            // out.println(ans);
        }
        out.print(ans);
        out.close();
    }

    
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?