public static void main ( String [ ] args ) throws Exception {
  Scanner in = new Scanner ( new File ( "B-large.in" ) ) ;
  PrintWriter out = new PrintWriter ( new FileWriter ( new File ( "B-large.out" ) ) ) ;
  int t = in . nextInt ( ) ;
  for ( int y = 0 ;
  y < t ;
  y ++ ) {
    double c = in . nextDouble ( ) ;
    double f = in . nextDouble ( ) ;
    double x = in . nextDouble ( ) ;
    long low = 0 ;
    long high = ( long ) 1E6 ;
    while ( low + 2 < high ) {
      long mid1 = low + ( high - low ) / 3 ;
      long mid2 = low + 2 * ( high - low ) / 3 ;
      if ( getTime ( mid1 , c , f , x ) < getTime ( mid2 , c , f , x ) ) {
        high = mid2 - 1 ;
      }
      else {
        low = mid1 ;
      }
    }
    double result = Double . POSITIVE_INFINITY ;
    for ( long z = low ;
    z <= high ;
    z ++ ) {
      result = Math . min ( result , getTime ( z , c , f , x ) ) ;
    }
    out . printf ( "Case #%d: %.7f\n" , y + 1 , result ) ;
  }
  out . close ( ) ;
}

public static void main ( String [ ] args ) throws Exception { Scanner in = new Scanner ( new File ( " B - large . in " ) ) ; PrintWriter out = new PrintWriter ( new FileWriter ( new File ( " B - large . out " ) ) ) ; int t = in . nextInt ( ) ; for ( int y = 0 ; y < t ; y ++ ) { double c = in . nextDouble ( ) ; double f = in . nextDouble ( ) ; double x = in . nextDouble ( ) ; long low = 0 ; long high = ( long ) 1E6 ; while ( low + 2 < high ) { long mid1 = low + ( high - low ) / 3 ; long mid2 = low + 2 * ( high - low ) / 3 ; if ( getTime ( mid1 , c , f , x ) < getTime ( mid2 , c , f , x ) ) { high = mid2 - 1 ; } else { low = mid1 ; } } double result = Double . POSITIVE_INFINITY ; for ( long z = low ; z <= high ; z ++ ) { result = Math . min ( result , getTime ( z , c , f , x ) ) ; } out . printf ( " Case ▁ # % d : ▁ % .7f \n " , y + 1 , result ) ; } out . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) 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 (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 (object_creation_expression type: (type_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)))) (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: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (floating_point_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) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (decimal_floating_point_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (floating_point_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: (identifier))) 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 (identifier) (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))