public static void main ( String [ ] args ) throws Exception {
  out = new PrintWriter ( System . out ) ;
  in = new StreamTokenizer ( new BufferedReader ( new InputStreamReader ( System . in ) ) ) ;
  int tests = next ( ) ;
  int m = 11000 ;
  double [ ] [ ] c = new double [ m ] [ m ] ;
  c [ 0 ] [ 0 ] = 1 ;
  for ( int i = 1 ;
  i < m ;
  i ++ ) {
    c [ i ] [ 0 ] = c [ i ] [ i ] = c [ i - 1 ] [ 0 ] / 2 ;
    for ( int j = 1 ;
    j < i ;
    j ++ ) c [ i ] [ j ] = ( c [ i - 1 ] [ j ] + c [ i - 1 ] [ j - 1 ] ) / 2 ;
  }
  for ( int test = 1 ;
  test <= tests ;
  test ++ ) {
    int n = next ( ) ;
    int x = Math . abs ( next ( ) ) ;
    int y = Math . abs ( next ( ) ) ;
    int level = ( x + y ) / 2 ;
    int sum = 0 ;
    int lev = 0 ;
    for ( ;
    ;
    lev ++ ) {
      sum += 4 * lev + 1 ;
      if ( sum >= n ) break ;
    }
    int kol = n - sum + 4 * lev + 1 ;
    double answ = 0 ;
    if ( level == lev ) {
      if ( x == 0 ) {
        if ( kol == 4 * lev + 1 ) answ = 1 ;
      }
      else {
        for ( int i = 0 ;
        i <= kol ;
        i ++ ) if ( i + Math . max ( 0 , kol - i - 2 * lev ) > y ) {
          answ += c [ kol ] [ i ] ;
        }
      }
    }
    else if ( level < lev ) answ = 1 ;
    out . print ( "Case #" + test + ": " ) ;
    out . println ( answ ) ;
  }
  out . close ( ) ;
}

public static void main ( String [ ] args ) throws Exception { out = new PrintWriter ( System . out ) ; in = new StreamTokenizer ( new BufferedReader ( new InputStreamReader ( System . in ) ) ) ; int tests = next ( ) ; int m = 11000 ; double [ ] [ ] c = new double [ m ] [ m ] ; c [ 0 ] [ 0 ] = 1 ; for ( int i = 1 ; i < m ; i ++ ) { c [ i ] [ 0 ] = c [ i ] [ i ] = c [ i - 1 ] [ 0 ] / 2 ; for ( int j = 1 ; j < i ; j ++ ) c [ i ] [ j ] = ( c [ i - 1 ] [ j ] + c [ i - 1 ] [ j - 1 ] ) / 2 ; } for ( int test = 1 ; test <= tests ; test ++ ) { int n = next ( ) ; int x = Math . abs ( next ( ) ) ; int y = Math . abs ( next ( ) ) ; int level = ( x + y ) / 2 ; int sum = 0 ; int lev = 0 ; for ( ; ; lev ++ ) { sum += 4 * lev + 1 ; if ( sum >= n ) break ; } int kol = n - sum + 4 * lev + 1 ; double answ = 0 ; if ( level == lev ) { if ( x == 0 ) { if ( kol == 4 * lev + 1 ) answ = 1 ; } else { for ( int i = 0 ; i <= kol ; i ++ ) if ( i + Math . max ( 0 , kol - i - 2 * lev ) > y ) { answ += c [ kol ] [ i ] ; } } } else if ( level < lev ) answ = 1 ; out . print ( " Case ▁ # " + test + " : ▁ " ) ; out . println ( answ ) ; } 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 (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (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 (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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)) dimensions: (dimensions_expr (identifier))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)) right: (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 (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (decimal_integer_literal)) right: (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: (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) right: (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 (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation 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 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 name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (decimal_integer_literal) right: (identifier))) right: (decimal_integer_literal)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (decimal_integer_literal)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) alternative: (block (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: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (decimal_integer_literal) right: (identifier)))))) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))))))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (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 (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))