Find the remainder when N is divided by 4 using Bitwise AND operator | Function to find the remainder ; Bitwise AND with 3 ; Return x ; Driver code
def findRemainder ( n ) : NEW_LINE INDENT x = n & 3 NEW_LINE return x NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 43 NEW_LINE ans = findRemainder ( N ) NEW_LINE print ( ans ) NEW_LINE DEDENT