Forever97 was interested in the dice. He has a dice with n faces: the first face of the dice contains a dot, the second one contains two dots, and so on, the n-th face contains n dots. Each face appears with probability 1/n when the dice is tossed. And each toss is independent from others. Now Forever97 wants to know the expected maximum number of dots he could get after tossing the dice m times. But he is busily engaged in studying math. Help him.
The input contains t (t<=100) test cases. Each of them contains two integers n and m (1 <= n, m <= 105).
For each case, output a single real number corresponding to the expected maximum in a line. Your computed values are to be printed with four digits after the decimal point.
6 1 2 2 6 3
3.5000 1.7500 4.9583