check if q and d have same number of set it or not .
if ( check ( m , n ) ) : NEW_LINE INDENT r = m NEW_LINE DEDENT else : NEW_LINE INDENT l = m + 1 NEW_LINE DEDENT if ( check ( l , n ) == False ) : NEW_LINE return math . floor ( l + 1 ) NEW_LINE else : NEW_LINE return math . floor ( l ) NEW_LINE def countDivisor ( n ) : NEW_LINE return n - bs ( n ) + 1 NEW_LINE