static int nDivisors ( boolean [ ] primes , int x , int a , int b , int n ) {
  int result = 0 ;
  ArrayList < Integer > v = new ArrayList < Integer > ( ) ;
  for ( int i = 2 ;
  i <= x ;
  i ++ ) if ( primes [ i ] == false ) v . add ( i ) ;
  for ( int i = a ;
  i <= b ;
  i ++ ) {
    int temp = i ;
    int total = 1 ;
    int j = 0 ;
    for ( int k = v . get ( j ) ;
    k * k <= temp ;
    k = v . get ( ++ j ) ) {
      int count = 0 ;
      while ( temp % k == 0 ) {
        count ++ ;
        temp = temp / k ;
      }
      total = total * ( count + 1 ) ;
    }
    if ( temp != 1 ) total = total * 2 ;
    if ( total == n ) result ++ ;
  }
  return result ;
}

static int nDivisors ( boolean [ ] primes , int x , int a , int b , int n ) { int result = 0 ; ArrayList < Integer > v = new ArrayList < Integer > ( ) ; for ( int i = 2 ; i <= x ; i ++ ) if ( primes [ i ] == false ) v . add ( i ) ; for ( int i = a ; i <= b ; i ++ ) { int temp = i ; int total = 1 ; int j = 0 ; for ( int k = v . get ( j ) ; k * k <= temp ; k = v . get ( ++ j ) ) { int count = 0 ; while ( temp % k == 0 ) { count ++ ; temp = temp / k ; } total = total * ( count + 1 ) ; } if ( temp != 1 ) total = total * 2 ; if ( total == n ) result ++ ; } return result ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (boolean_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (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: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (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: (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (false))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (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: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) update: (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (update_expression (identifier))))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (update_expression (identifier)))))) (return_statement (identifier))))