public static double dp ( int numDiff ) {
  if ( numDiff >= C ) return 0.0 ;
  if ( dp [ numDiff ] != - 1.0 ) return dp [ numDiff ] ;
  double pr0 = ( ( double ) choose ( numDiff , N ) ) / choose ( C , N ) ;
  double ev = 0.0 ;
  for ( int i = 1 ;
  i <= N ;
  i ++ ) {
    ev += ( 1.0 + dp ( numDiff + i ) ) * ( ( ( double ) choose ( numDiff , N - i ) * choose ( C - numDiff , i ) ) ) / ( choose ( C , N ) ) ;
  }
  double ans = ( pr0 + ev ) / ( 1 - pr0 ) ;
  dp [ numDiff ] = ans ;
  return ans ;
}

public static double dp ( int numDiff ) { if ( numDiff >= C ) return 0.0 ; if ( dp [ numDiff ] != - 1.0 ) return dp [ numDiff ] ; double pr0 = ( ( double ) choose ( numDiff , N ) ) / choose ( C , N ) ; double ev = 0.0 ; for ( int i = 1 ; i <= N ; i ++ ) { ev += ( 1.0 + dp ( numDiff + i ) ) * ( ( ( double ) choose ( numDiff , N - i ) * choose ( C - numDiff , i ) ) ) / ( choose ( C , N ) ) ; } double ans = ( pr0 + ev ) / ( 1 - pr0 ) ; dp [ numDiff ] = ans ; return ans ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (return_statement (decimal_floating_point_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (unary_expression operand: (decimal_floating_point_literal)))) consequence: (return_statement (array_access array: (identifier) index: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (cast_expression type: (floating_point_type) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_floating_point_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: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (cast_expression type: (floating_point_type) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier))))) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (identifier))))))) right: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (return_statement (identifier))))