static int findPowerComposite ( int fact , int n ) {
  int res = Integer . MAX_VALUE ;
  for ( int i = 2 ;
  i <= Math . sqrt ( n ) ;
  i ++ ) {
    int count = 0 ;
    if ( n % i == 0 ) {
      count ++ ;
      n = n / i ;
    }
    if ( count > 0 ) {
      int curr_pow = findPowerPrime ( fact , i ) / count ;
      res = Math . min ( res , curr_pow ) ;
    }
  }
  if ( n >= 2 ) {
    int curr_pow = findPowerPrime ( fact , n ) ;
    res = Math . min ( res , curr_pow ) ;
  }
  return res ;
}

static int findPowerComposite ( int fact , int n ) { int res = Integer . MAX_VALUE ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; i ++ ) { int count = 0 ; if ( n % i == 0 ) { count ++ ; n = n / i ; } if ( count > 0 ) { int curr_pow = findPowerPrime ( fact , i ) / count ; res = Math . min ( res , curr_pow ) ; } } if ( n >= 2 ) { int curr_pow = findPowerPrime ( fact , n ) ; res = Math . min ( res , curr_pow ) ; } return res ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (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: (field_access object: (identifier) field: (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (return_statement (identifier))))