Asked by Jane Street
Question
Given integers M and N, write a program that counts how many positive integer pairs (a, b) satisfy the following conditions:
a + b = M
a XOR b = N
Given integers M and N, write a program that counts how many positive integer pairs (a, b) satisfy the following conditions:
a + b = M
a XOR b = N