Condition to check no of bits is out of bound
if ( r - l + 1 <= 64 ) : NEW_LINE INDENT no_of_substr += l + 1 NEW_LINE DEDENT else : NEW_LINE INDENT no_of_substr += arr [ l + 1 ] + 1 NEW_LINE DEDENT return no_of_substr NEW_LINE