Above is my solution to War of xor, can anyone tell me what is wrong in my solution ? asked 17 Sep '18, 20:11

Its integer overflow which is causing you WA. Convert int to long and submit. answered 17 Sep '18, 20:40

still i am getting wa answered 19 Sep '18, 11:37
your code slightly updated gives AC
(19 Sep '18, 15:54)

Look, the multiplication of two integer numbers can give you an answer which is outside the range of int. For example $ 1000000 * 1000000 $. both numbers are in the range of int but the multiplication is 10^12.
which is outside the range of int. answered 19 Sep '18, 16:12
