public static void main ( String [ ] args ) {
  BufferedReader reader = null ;
  PrintWriter writer = null ;
  try {
    String fileName = "A-large" ;
    File folder = new File ( new File ( "files" , "codejam2010" ) , "qualification" ) ;
    File inputFile = new File ( folder , fileName + ".in" ) ;
    File outputFile = new File ( folder , fileName + ".out" ) ;
    reader = new BufferedReader ( new FileReader ( inputFile ) ) ;
    writer = new PrintWriter ( new FileWriter ( outputFile ) ) ;
    int count = Integer . parseInt ( reader . readLine ( ) ) ;
    for ( int i = 0 ;
    i < count ;
    i ++ ) {
      String [ ] parameters = reader . readLine ( ) . split ( "\\s" ) ;
      writer . printf ( "Case #%d: %s\n" , i + 1 , solveIt ( Integer . parseInt ( parameters [ 0 ] ) , Integer . parseInt ( parameters [ 1 ] ) ) ) ;
    }
  }
  catch ( Exception e ) {
    e . printStackTrace ( ) ;
  }
  finally {
    close ( reader ) ;
    close ( writer ) ;
  }
  System . out . println ( "Done." ) ;
}

public static void main ( String [ ] args ) { BufferedReader reader = null ; PrintWriter writer = null ; try { String fileName = " A - large " ; File folder = new File ( new File ( " files " , " codejam2010" ) , " qualification " ) ; File inputFile = new File ( folder , fileName + " . in " ) ; File outputFile = new File ( folder , fileName + " . out " ) ; reader = new BufferedReader ( new FileReader ( inputFile ) ) ; writer = new PrintWriter ( new FileWriter ( outputFile ) ) ; int count = Integer . parseInt ( reader . readLine ( ) ) ; for ( int i = 0 ; i < count ; i ++ ) { String [ ] parameters = reader . readLine ( ) . split ( " \\ s " ) ; writer . printf ( " Case ▁ # % d : ▁ % s \n " , i + 1 , solveIt ( Integer . parseInt ( parameters [ 0 ] ) , Integer . parseInt ( parameters [ 1 ] ) ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { close ( reader ) ; close ( writer ) ; } System . out . println ( " Done . " ) ; }
(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: (null_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_literal))) (try_statement body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (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 (string_literal) (string_literal))) (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (string_literal)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (string_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal) (binary_expression left: (identifier) right: (decimal_integer_literal)) (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))))))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (finally_clause (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))