A drawer holds black black socks and white white ones. You take k at
random without replacement. Return the probability the socks you took can be
split into same-colour pairs with nothing left over.
That works out exactly when the number of black socks drawn is even and the number of white ones is too. Sum the hypergeometric probability over the even counts.
Input
black = 5
white = 5
k = 4
Output
0.5238095238095238