public static void main ( String [ ] args ) {
  if ( args . length < 1 ) {
    System . out . println ( "Usage: <fnIn>" ) ;
  }
  String fn = args [ 0 ] ;
  String fnOut = toFnOut ( fn ) ;
  try {
    BufferedReader br = new BufferedReader ( new FileReader ( fn ) ) ;
    BufferedWriter bw = new BufferedWriter ( new FileWriter ( fnOut ) ) ;
    String line = null ;
    int NCase = Integer . valueOf ( br . readLine ( ) . trim ( ) ) ;
    long stime = System . currentTimeMillis ( ) ;
    for ( int icase = 0 ;
    icase < NCase ;
    icase ++ ) {
      int [ ] a = toIntArray ( br . readLine ( ) ) ;
      String buf = process ( a [ 0 ] , a [ 1 ] ) ;
      String out = "Case #" + ( icase + 1 ) + ": " + buf ;
      bw . write ( out , 0 , out . length ( ) ) ;
      bw . newLine ( ) ;
      long ctime = System . currentTimeMillis ( ) ;
      System . out . println ( String . format ( "--- Done: #%2d,%3.0fs, ends in:%2.1fm" , ( icase + 1 ) , ( ctime - stime ) * 0.001 , ( ctime - stime ) * 0.001 / 60 * NCase / ( icase + 1 ) ) ) ;
    }
    br . close ( ) ;
    bw . close ( ) ;
  }
  catch ( IOException ex ) {
    System . out . println ( ex ) ;
  }
}

public static void main ( String [ ] args ) { if ( args . length < 1 ) { System . out . println ( " Usage : ▁ < fnIn > " ) ; } String fn = args [ 0 ] ; String fnOut = toFnOut ( fn ) ; try { BufferedReader br = new BufferedReader ( new FileReader ( fn ) ) ; BufferedWriter bw = new BufferedWriter ( new FileWriter ( fnOut ) ) ; String line = null ; int NCase = Integer . valueOf ( br . readLine ( ) . trim ( ) ) ; long stime = System . currentTimeMillis ( ) ; for ( int icase = 0 ; icase < NCase ; icase ++ ) { int [ ] a = toIntArray ( br . readLine ( ) ) ; String buf = process ( a [ 0 ] , a [ 1 ] ) ; String out = " Case ▁ # " + ( icase + 1 ) + " : ▁ " + buf ; bw . write ( out , 0 , out . length ( ) ) ; bw . newLine ( ) ; long ctime = System . currentTimeMillis ( ) ; System . out . println ( String . format ( " - - - ▁ Done : ▁ # %2d , %3.0fs , ▁ ends ▁ in : %2.1fm " , ( icase + 1 ) , ( ctime - stime ) * 0.001 , ( ctime - stime ) * 0.001 / 60 * NCase / ( icase + 1 ) ) ) ; } br . close ( ) ; bw . close ( ) ; } catch ( IOException ex ) { System . out . println ( ex ) ; } }
(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 (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (decimal_integer_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (try_statement body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (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: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)) (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (string_literal)) right: (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal) (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_floating_point_literal)) (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_floating_point_literal)) right: (decimal_integer_literal)) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))))))))