human
What is a code to find XOR sum of Bitwise AND of all pairs from given two Arrays and the other steps required given the following:
Find XOR sum of Bitwise AND of all pairs from given two Arrays | Function to calculate the XOR sum of all ANDS of all pairs on A and B.
variable to store anshu.
when there has been no AND of pairs before this.
Driver code.
Input.
Function call"
Solution in Python:
assistant
#Here is code to find XOR sum of Bitwise AND of all pairs from given two Arrays and the other steps required.
 def XorSum ( A , B , N , M ) :
	ans = - 1
	for i in range ( N ) :
		for j in range ( M ) :
			if ( ans == - 1 ) :
				ans = ( A [ i ] & B [ j ] )
			else :
				ans ^= ( A [ i ] & B [ j ] )
	return ans
if __name__ == ' _ _ main _ _ ' :
	A = [ 3 , 5 ]
	B = [ 2 , 3 ]
	N = len ( A )
	M = len ( B )
	print ( XorSum ( A , B , N , M ) )