Check if a pair of integers from two ranges exists such that their Bitwise XOR exceeds both the ranges | Function to check if there exists any pair ( P , Q ) whose Bitwise XOR is greater than the Bitwise XOR of X and Y ; Check for the invalid condition ; Otherwise , ; Driver Code
function findWinner ( X , Y ) { let first = ( X ^ Y ) ; let second = ( X + Y ) ; if ( first == second ) { document . write ( " " ) ; } else { document . write ( " " ) ; } } let A = 2 , B = 4 ; findWinner ( A , B ) ;