Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can you find a different way to describe the second condition?
The sum of the number of set bits in (num1 OR num2) and (num1 AND num2) is equal to the sum of the number of set bits in num1 and num2.