static int kPrimeFactor ( int n , int k , int [ ] s ) {
  while ( n > 1 ) {
    if ( k == 1 ) return s [ n ] ;
    k -- ;
    n /= s [ n ] ;
  }
  return - 1 ;
}

static int kPrimeFactor ( int n , int k , int [ ] s ) { while ( n > 1 ) { if ( k == 1 ) return s [ n ] ; k -- ; n /= s [ n ] ; } return - 1 ; }
(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)) (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (array_access array: (identifier) index: (identifier)))) (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))))) (return_statement (unary_expression operand: (decimal_integer_literal)))))