Flip consecutive set bits starting from LSB of a given number | Function to find the number after converting 1 s from end to 0 s ; Return the logical AND of N and ( N + 1 ) ; Driver Code ; Function Call
def findNumber ( N ) : NEW_LINE INDENT return N & ( N + 1 ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 39 NEW_LINE print ( findNumber ( N ) ) NEW_LINE DEDENT