Maximum value of B less than A such that A ^ B = A + B | Function to find the maximum value of B such that A ^ B = A + B ; Binary Representation of A ; Loop to find the negation of the integer A ; output ; Driver Code ; Function Call
def maxValue ( a ) : NEW_LINE INDENT a = bin ( a ) [ 2 : ] NEW_LINE b = ' ' NEW_LINE for i in list ( a ) : NEW_LINE INDENT b += str ( int ( not int ( i ) ) ) NEW_LINE DEDENT print ( int ( b , 2 ) ) NEW_LINE return int ( b , 2 ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT a = 4 NEW_LINE maxValue ( a ) NEW_LINE DEDENT