human
Find the triplet from given Bitwise XOR and Bitwise AND values of all its pairs | Function to find the triplet with given Bitwise XOR and Bitwise AND values of all possible pairs of the triplet.
Stores values of a triplet.
Stores a + b.
Stores a + c.
Stores b + c.
Calculate aSUMb.
Calculate aSUMc.
Calculate bSUMc.
Calculate a.
Calculate b.
Calculate c.
Pra.
Prb.
Prc.
Driver Code"
Solution in Python:

What is a code to find the triplet from given Bitwise XOR and Bitwise AND values of all its pairs and the other steps required?
assistant
#Here is code to find the triplet from given Bitwise XOR and Bitwise AND values of all its pairs and the other steps required.
 def findNumbers ( aXORb , aANDb , aXORc , aANDc , bXORc , bANDc ) :
	a , b , c = 0 , 0 , 0 ;
	aSUMb = 0 ;
	aSUMc = 0 ;
	bSUMc = 0 ;
	aSUMb = aXORb + aANDb * 2 ;
	aSUMc = aXORc + aANDc * 2 ;
	bSUMc = bXORc + bANDc * 2 ;
	a = ( aSUMb - bSUMc + aSUMc ) // 2 ;
	b = aSUMb - a ;
	c = aSUMc - a ;
	print ( " a ▁ = ▁ " , a , end = " " ) ;
	print ( " , ▁ b ▁ = ▁ " , b , end = " " ) ;
	print ( " , ▁ c ▁ = ▁ " , c , end = " " ) ;
if __name__ == ' _ _ main _ _ ' :
	aXORb = 30 ; aANDb = 0 ; aXORc = 20 ; aANDc = 10 ; bXORc = 10 ; bANDc = 20 ;
	findNumbers ( aXORb , aANDb , aXORc , aANDc , bXORc , bANDc ) ;