You are viewing a single comment's thread. Return to all comments →
int _l= Integer.parseInt(in.nextLine()); int _r= Integer.parseInt(in.nextLine()); System.out.println((int)Math.pow(2, Integer.toBinaryString(_l^_r).length())-1);
My solution in java.
Seems like cookies are disabled on this browser, please enable them to open this website
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
My solution in java.