public static long solve ( String s , long n ) {
  long bef_cont = 0 ;
  long bef_noncont = 0 ;
  long endpart = 0 ;
  System . out . println ( ) ;
  for ( int i = 0 ;
  i < s . length ( ) ;
  i ++ ) {
    long bef_cont_prev = bef_cont ;
    long bef_noncont_prev = bef_noncont ;
    char c = s . charAt ( i ) ;
    boolean cns = ! ( ( c == 'a' ) || ( c == 'e' ) || ( c == 'i' ) || ( c == 'o' ) || ( c == 'u' ) ) ;
    bef_noncont = bef_noncont_prev + bef_cont_prev ;
    if ( cns ) {
      endpart ++ ;
      if ( endpart >= n ) {
        bef_cont = ( i - n + 2 ) ;
      }
      else {
        bef_cont = bef_cont_prev ;
      }
    }
    else {
      bef_cont = bef_cont_prev ;
      endpart = 0 ;
    }
  }
  return bef_cont + bef_noncont ;
}

public static long solve ( String s , long n ) { long bef_cont = 0 ; long bef_noncont = 0 ; long endpart = 0 ; System . out . println ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { long bef_cont_prev = bef_cont ; long bef_noncont_prev = bef_noncont ; char c = s . charAt ( i ) ; boolean cns = ! ( ( c == ' a ' ) || ( c == ' e ' ) || ( c == ' i ' ) || ( c == ' o ' ) || ( c == ' u ' ) ) ; bef_noncont = bef_noncont_prev + bef_cont_prev ; if ( cns ) { endpart ++ ; if ( endpart >= n ) { bef_cont = ( i - n + 2 ) ; } else { bef_cont = bef_cont_prev ; } } else { bef_cont = bef_cont_prev ; endpart = 0 ; } } return bef_cont + bef_noncont ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) 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: (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))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) 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: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (update_expression (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))))) (return_statement (binary_expression left: (identifier) right: (identifier)))))