@@ -0,0 +1,751 @@
+//https://www.hackerrank.com/challenges/and-product%0Aimport java.io.*;%0A%0Apublic class Solution %7B%0A  public static void main(String%5B%5D args) throws IOException %7B%0A    StringBuffer sb = new StringBuffer();%0A    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A%0A    //For each test%0A    for(short T = Short.parseShort(br.readLine()); T %3E 0; --T)%7B%0A%0A      //Get input%0A      String%5B%5D line = br.readLine().split(%22 %22);%0A      final long A = Long.parseLong(line%5B0%5D);%0A      final long B = Long.parseLong(line%5B1%5D);%0A      %0A      //Get output%0A      long C = B - A;%0A      for(long t = C; (t = C & (C-1)) %3E 0; C = t)%7B%7D%0A      C = A & B & (-(C %3C%3C 1));%0A      %0A      //Print output%0A      sb.append(C).append(%22%5Cn%22);%0A    %7D%0A    System.out.print(sb);%0A  %7D%0A%7D%0A

Create and-product.java