public static void binarySearch ( int n ) {
  int low = 0 ;
  int high = Integer . MAX_VALUE ;
  while ( low < high ) {
    int middle = ( low + high ) / 2 ;
    int count = zeroes ( middle ) ;
    if ( count < n ) {
      low = middle + 1 ;
    }
    else {
      high = middle ;
    }
  }
  int ans [ ] = new int [ 1000 ] ;
  int k = 0 ;
  while ( zeroes ( low ) == n ) {
    ans [ k ] = low ;
    k ++ ;
    low ++ ;
  }
  System . out . println ( k ) ;
  for ( int i = 0 ;
  i < k ;
  i ++ ) {
    System . out . print ( ans [ i ] + " " ) ;
  }
}

public static void binarySearch ( int n ) { int low = 0 ; int high = Integer . MAX_VALUE ; while ( low < high ) { int middle = ( low + high ) / 2 ; int count = zeroes ( middle ) ; if ( count < n ) { low = middle + 1 ; } else { high = middle ; } } int ans [ ] = new int [ 1000 ] ; int k = 0 ; while ( zeroes ( low ) == n ) { ans [ k ] = low ; k ++ ; low ++ ; } System . out . println ( k ) ; for ( int i = 0 ; i < k ; i ++ ) { System . out . print ( ans [ i ] + " ▁ " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (identifier))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (string_literal)))))))))