63. Exactly k Heads in n Tosses

Medium

Choose which k of the n positions are heads, over all 2n2^n equally likely sequences:

P(exactly k heads)=(nk)2nP(\text{exactly } k \text{ heads}) = \frac{\binom{n}{k}}{2^n}

Return the probability as a float.

Input

n = 3
k = 2

Output

0.375
Implement solve(...)