private static long calc ( int x ) {
  int [ ] primes = new int [ x + 1 ] ;
  Arrays . fill ( primes , 1 ) ;
  primes [ 0 ] = primes [ 1 ] = 0 ;
  for ( int i = 3 ;
  i < primes . length ;
  i ++ ) {
    if ( i % 2 == 0 ) primes [ i ] = 0 ;
  }
  int j = 3 ;
  while ( j * j < primes . length ) {
    for ( int k = j + 1 ;
    k < primes . length ;
    k ++ ) {
      if ( k % j == 0 ) primes [ k ] = 0 ;
    }
    j += 2 ;
  }
  int [ ] factors = new int [ x + 1 ] ;
  while ( x > 1 ) {
    int i = 3 ;
    int f = x ;
    while ( f % 2 == 0 ) {
      factors [ 2 ] ++ ;
      f /= 2 ;
    }
    while ( i <= f ) {
      if ( primes [ i ] == 1 ) {
        while ( f % i == 0 ) {
          factors [ i ] ++ ;
          f /= i ;
        }
      }
      i += 2 ;
    }
    if ( f != 1 ) factors [ f ] ++ ;
    x -- ;
  }
  long d = ( long ) Math . pow ( 10 , 9 ) + 7 ;
  long count = 1 ;
  for ( int f : factors ) {
    if ( f != 0 ) count *= ( f + 1 ) ;
    while ( count >= d ) {
      count -= d ;
    }
  }
  return count ;
}

private static long calc ( int x ) { int [ ] primes = new int [ x + 1 ] ; Arrays . fill ( primes , 1 ) ; primes [ 0 ] = primes [ 1 ] = 0 ; for ( int i = 3 ; i < primes . length ; i ++ ) { if ( i % 2 == 0 ) primes [ i ] = 0 ; } int j = 3 ; while ( j * j < primes . length ) { for ( int k = j + 1 ; k < primes . length ; k ++ ) { if ( k % j == 0 ) primes [ k ] = 0 ; } j += 2 ; } int [ ] factors = new int [ x + 1 ] ; while ( x > 1 ) { int i = 3 ; int f = x ; while ( f % 2 == 0 ) { factors [ 2 ] ++ ; f /= 2 ; } while ( i <= f ) { if ( primes [ i ] == 1 ) { while ( f % i == 0 ) { factors [ i ] ++ ; f /= i ; } } i += 2 ; } if ( f != 1 ) factors [ f ] ++ ; x -- ; } long d = ( long ) Math . pow ( 10 , 9 ) + 7 ; long count = 1 ; for ( int f : factors ) { if ( f != 0 ) count *= ( f + 1 ) ; while ( count >= d ) { count -= d ; } } return count ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (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: (binary_expression left: (identifier) right: (identifier)) right: (field_access object: (identifier) field: (identifier)))) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) 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: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (array_access array: (identifier) index: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (array_access array: (identifier) index: (identifier))))) (expression_statement (update_expression (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal)))) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (return_statement (identifier))))