You are given two positive integers and .
You are required to choose distinct integers from to inclusive. The selection is made uniformly at random; that is, each possible -element subset of the set \{1, 2, \dots, n\} is chosen with equal probability.
Let be the smallest integer among the selected numbers. Find the expected value of 2^S. In other words, determine the average value of raised to the power , where the average is taken over all possible selections of distinct integers.
Two positive integers n~(1 \le n \le 50) and x~(1 \le x \le n).
Print the expected value of 2^S, rounded to digits after the decimal point.
In the first test case, there is only one possible selection: \{1, 2, 3, 4\}. The minimum element is , so the required value is 2^1 = 2.
In the second test case, there are three equally likely selections: , , and . The corresponding values of are , , and . Therefore, the average value of 2^S is
Example 1
Example 2