public static void main ( String [ ] args ) throws Exception {
  BufferedReader br = new BufferedReader ( new FileReader ( "C-small-1-attempt2.in" ) ) ;
  BufferedWriter bw = new BufferedWriter ( new FileWriter ( "solve.txt" ) ) ;
  int T = Integer . parseInt ( br . readLine ( ) . trim ( ) ) ;
  StringTokenizer s ;
  for ( int t = 1 ;
  t <= T ;
  t ++ ) {
    s = new StringTokenizer ( br . readLine ( ) . trim ( ) ) ;
    int N = Integer . parseInt ( s . nextToken ( ) ) ;
    int K = Integer . parseInt ( s . nextToken ( ) ) ;
    double [ ] arr = new double [ N ] ;
    double U = Double . parseDouble ( br . readLine ( ) . trim ( ) ) ;
    s = new StringTokenizer ( br . readLine ( ) . trim ( ) ) ;
    for ( int i = 0 ;
    i < N ;
    i ++ ) {
      arr [ i ] = Double . parseDouble ( s . nextToken ( ) ) ;
    }
    Arrays . sort ( arr ) ;
    double pro = 0 ;
    for ( int i = 0 ;
    i < N ;
    i ++ ) {
      if ( i != N - 1 ) {
        if ( U > ( ( i + 1 ) * ( arr [ i + 1 ] - arr [ i ] ) ) ) {
          U -= ( ( i + 1 ) * ( arr [ i + 1 ] - arr [ i ] ) ) ;
        }
        else {
          pro = Math . pow ( ( arr [ i ] + ( U / ( i + 1 ) ) ) , i + 1 ) ;
          for ( int j = i + 1 ;
          j < N ;
          j ++ ) {
            pro *= arr [ j ] ;
          }
          break ;
        }
      }
      else {
        pro = Math . pow ( ( U / N ) + arr [ i ] , N ) ;
      }
    }
    bw . write ( "Case #" + t + ": " ) ;
    bw . write ( String . format ( "%.6f\n" , pro ) ) ;
  }
  br . close ( ) ;
  bw . close ( ) ;
  return ;
}

public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new FileReader ( " C - small - 1 - attempt2 . in " ) ) ; BufferedWriter bw = new BufferedWriter ( new FileWriter ( " solve . txt " ) ) ; int T = Integer . parseInt ( br . readLine ( ) . trim ( ) ) ; StringTokenizer s ; for ( int t = 1 ; t <= T ; t ++ ) { s = new StringTokenizer ( br . readLine ( ) . trim ( ) ) ; int N = Integer . parseInt ( s . nextToken ( ) ) ; int K = Integer . parseInt ( s . nextToken ( ) ) ; double [ ] arr = new double [ N ] ; double U = Double . parseDouble ( br . readLine ( ) . trim ( ) ) ; s = new StringTokenizer ( br . readLine ( ) . trim ( ) ) ; for ( int i = 0 ; i < N ; i ++ ) { arr [ i ] = Double . parseDouble ( s . nextToken ( ) ) ; } Arrays . sort ( arr ) ; double pro = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( i != N - 1 ) { if ( U > ( ( i + 1 ) * ( arr [ i + 1 ] - arr [ i ] ) ) ) { U -= ( ( i + 1 ) * ( arr [ i + 1 ] - arr [ i ] ) ) ; } else { pro = Math . pow ( ( arr [ i ] + ( U / ( i + 1 ) ) ) , i + 1 ) ; for ( int j = i + 1 ; j < N ; j ++ ) { pro *= arr [ j ] ; } break ; } } else { pro = Math . pow ( ( U / N ) + arr [ i ] , N ) ; } } bw . write ( " Case ▁ # " + t + " : ▁ " ) ; bw . write ( String . format ( " % .6f \n " , pro ) ) ; } br . close ( ) ; bw . close ( ) ; return ; }
(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 (string_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: (type_identifier) declarator: (variable_declarator name: (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: (object_creation_expression type: (type_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 (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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (floating_point_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)))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) 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 (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (identifier)))))))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (identifier))))))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (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)))))) (break_statement)))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (array_access array: (identifier) index: (identifier))) (identifier))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (string_literal) right: (identifier)) right: (string_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal) (identifier)))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (return_statement)))