check if q and d have same number of set it or not .
if ( check ( $ m , $ n ) ) $ r = $ m ; else $ l = $ m + 1 ; } if ( ! check ( $ l , $ n ) ) return floor ( $ l + 1 ) ; else return floor ( $ l ) ; } function countDivisor ( $ n ) { return $ n - bs ( $ n ) + 1 ; }