human
Number of pairs with Bitwise OR as Odd number | Function to count pairs with odd OR.
Count total even numbers in array.
Even pair count.
Total pairs.
Return Odd pair count.
Driver Code"
Solution in Python:
assistant
#Here is code to number of pairs with Bitwise OR as Odd number and the other steps required.
 def countOddPair ( A , N ) :
	count = 0
	for i in range ( 0 , N ) :
		if ( A [ i ] % 2 != 1 ) :
			count += 1
	evenPairCount = count * ( count - 1 ) / 2
	totPairs = N * ( N - 1 ) / 2
	return ( int ) ( totPairs - evenPairCount )
A = [ 5 , 6 , 2 , 8 ]
N = len ( A )
print ( countOddPair ( A , N ) )