public static void main ( String [ ] args ) {
  String prblm = "A" ;
  boolean fl = true ;
  String filein = prblm + "-" + ( ( fl ) ? "large" : "small" ) + ".in.txt" ;
  String fileout = prblm + "-" + ( ( fl ) ? "large" : "small" ) + ".out.txt" ;
  try {
    BufferedReader fr = new BufferedReader ( new FileReader ( filein ) ) ;
    BufferedWriter fw = new BufferedWriter ( new FileWriter ( fileout ) ) ;
    String s = fr . readLine ( ) ;
    int T = Integer . parseInt ( s ) ;
    for ( int i = 1 ;
    i <= T ;
    i ++ ) {
      s = fr . readLine ( ) ;
      String [ ] tok = s . split ( " " ) ;
      long r = Long . parseLong ( tok [ 0 ] ) ;
      long t = Long . parseLong ( tok [ 1 ] ) ;
      long mn = 0 , mx = 2000000000l ;
      while ( mx - mn > 0 ) {
        long v = ( mn + mx + 1 ) / 2 ;
        if ( Long . MAX_VALUE / ( 2 * r + 2 * v - 1 ) < v || v * ( 2 * r + 2 * v - 1 ) > t ) mx = v - 1 ;
        else mn = v ;
      }
      System . out . println ( mn ) ;
      fw . write ( "Case #" + i + ": " + mn + "\n" ) ;
    }
    fr . close ( ) ;
    fw . close ( ) ;
  }
  catch ( Exception e ) {
    e . printStackTrace ( ) ;
  }
}

public static void main ( String [ ] args ) { String prblm = " A " ; boolean fl = true ; String filein = prblm + " - " + ( ( fl ) ? " large " : " small " ) + " . in . txt " ; String fileout = prblm + " - " + ( ( fl ) ? " large " : " small " ) + " . out . txt " ; try { BufferedReader fr = new BufferedReader ( new FileReader ( filein ) ) ; BufferedWriter fw = new BufferedWriter ( new FileWriter ( fileout ) ) ; String s = fr . readLine ( ) ; int T = Integer . parseInt ( s ) ; for ( int i = 1 ; i <= T ; i ++ ) { s = fr . readLine ( ) ; String [ ] tok = s . split ( " ▁ " ) ; long r = Long . parseLong ( tok [ 0 ] ) ; long t = Long . parseLong ( tok [ 1 ] ) ; long mn = 0 , mx = 2000000000l ; while ( mx - mn > 0 ) { long v = ( mn + mx + 1 ) / 2 ; if ( Long . MAX_VALUE / ( 2 * r + 2 * v - 1 ) < v || v * ( 2 * r + 2 * v - 1 ) > t ) mx = v - 1 ; else mn = v ; } System . out . println ( mn ) ; fw . write ( " Case ▁ # " + i + " : ▁ " + mn + " \n " ) ; } fr . close ( ) ; fw . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
(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: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (parenthesized_expression (ternary_expression condition: (parenthesized_expression (identifier)) consequence: (string_literal) alternative: (string_literal)))) right: (string_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (parenthesized_expression (ternary_expression condition: (parenthesized_expression (identifier)) consequence: (string_literal) alternative: (string_literal)))) right: (string_literal)))) (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: (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 (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal)))) right: (identifier)) right: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal)))) right: (identifier)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (identifier)) right: (string_literal)) right: (identifier)) right: (string_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: (identifier) name: (identifier) arguments: (argument_list))))))))