public static void main ( String [ ] args ) {
  String s = "abacsddaa" ;
  int pos ;
  int n = s . length ( ) ;
  int query [ ] = {
    9 , 3 , 2 };
    int Q = query . length ;
    for ( int i = 0 ;
    i < Q ;
    i ++ ) {
      pos = query [ i ] ;
      System . out . println ( Count ( s , pos ) ) ;
    }
  }
  
public static void main ( String [ ] args ) { String s = " abacsddaa " ; int pos ; int n = s . length ( ) ; int query [ ] = { 9 , 3 , 2 } ; int Q = query . length ; for ( int i = 0 ; i < Q ; i ++ ) { pos = query [ i ] ; System . out . println ( Count ( s , pos ) ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_initializer (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal)))) (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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))))))))