Count of numbers in range [ L , R ] with LSB as 0 in their Binary representation | Function to return the count of required numbers ; Count of numbers in range which are divisible by 2 ; Driver code
def countNumbers ( l , r ) : NEW_LINE INDENT return ( ( r // 2 ) - ( l - 1 ) // 2 ) NEW_LINE DEDENT l = 10 NEW_LINE r = 20 NEW_LINE print ( countNumbers ( l , r ) ) NEW_LINE