P16852 [HackerEarth] Probably you all are familiar with famous tiles problem in which you have to fill 2*n size field using tiles of size 2*1. Now consider that same 2*n size field is composed of 1*1 size ce
普及
题目描述

Probably you all are familiar with famous tiles problem in which you have to fill 2n size field using tiles of size 21. Now consider that same 2n size field is composed of 11 size cells. So there are total 2n cells in field. Now we will fill that field with tiles randomly. There would be
a number of ways in which we can fill that field using these tiles ( Actually in classic version of problem, we count the no of ways). Now assume that when a tile is
put vertically in the field (for example when tile is placed covering cell no (1,1) and (2,1)), it adds a weight of 1 unit each on both cells. But when a tile is
placed horizontally ( for example when tile is placed covering cell no (1,1) and (1,2)), it doesn't add any weight on any cell. Now as you know there are a lot of
ways to fill a 2
n size field, in some ways there can be weight on some particular cell, in some other ways there might not be weight on that particular cell
(depending upon whether the tile covering that particular cell is horizontal or vertical). So there will be some expected value of weight on every cell when you will
fill a 2*n size field randomly. You have to calculate expected value of weight on every cell and find their sum. So you will be given 'n' in input and you have to output desired
sum of expected value of weight on each cell.

Ex: If n=2, then there are two ways to arrange tiles. In one way both tiles will be horizontal and in other both are vertical. Let four cells are
(1,1), (1,2), (2,1), (2,2). So in first method there will be '0' weight on each cell and in second there will be '1' weight on each cell. So for every cell
expected value of weight is 0.5 , so sum of all four cell will be 0.5 * 4 = 2.

Input: First line will contain 't', number of test cases. 't' lines follow, each containing value of n.

Output: For each test case output the sum of expected weight on each cell (answer must be correct upto 6 decimal places).

Constraints:

1 ≤ t ≤ 1000

1 ≤ n ≤ 50

SAMPLE INPUT
4
1
2
3
4

SAMPLE OUTPUT
2.000000
2.000000
3.333333
4.000000

输入格式

见题面

输出格式

见题面

样例输入
1000 36 32 13 9 7 49 9 9 15 2 44 39 42 32 34 37 44 29 40 41 14 16 24 1 32 39 27 24 47 49 29 12 44 38 27 49 6 28 1 9 34 18 25 35 10 47 24 19 6 35 32 26 16 33 45 13 30 8 30 24 30 44 21 4 30 4 31 36 45 38 49 10 43 36 24 14 14 45 14 28 33 40 41 24 10 24 16 2 4 1 8 28 23 14 47 16 46 24 41 1 1 10 14 29 18 37 13 11 34 44 33 22 15 16 21 4 18 8 12 14 36 45 40 22 4 46 30 23 7 26 26 6 30 11 1 26 47 47 17 35 15 2 22 9 25 16 43 34 1 18 34 27 24 39 4 41 18 15 27 43 9 7 33 7 24 14 23 43 20 36 38 40 17 9 45 40 38 49 41 9 30 29 37 26 14 33 20 44 10 49 9 44 50 4 30 5 3 42 47 48 7 19 2 11 18 12 39 10 38 10 5 2 9 33 38 44 37 1 21 35 4 12 45 1 8 23 45 29 41 22 3 36 48 7 25 7 10 29 17 11 47 49 14 31 46 8 40 25 19 47 7 35 42 4 41 19 45 4 43 4 8 1 4 13 10 20 11 50 49 42 28 28 49 32 7 27 24 3 40 24 37 34 21 17 49 46 44 14 21 43 18 29 38 15 43 17 27 44 27 43 9 8 33 40 48 30 43 13 30 19 7 22 20 7 48 7 28 44 8 30 12 19 49 20 1 14 17 11 2 2 7 45 47 50 33 5 43 37 9 7 32 15 50 16 6 35 29 22 21 8 31 40 25 33 25 15 32 23 49 20 50 22 32 32 31 16 1 46 31 27 31 25 13 11 5 42 3 17 29 24 31 19 12 12 33 10 27 5 45 20 34 30 17 16 21 21 18 18 19 40 14 33 41 24 39 19 13 4 35 32 6 6 44 7 48 4 10 1 24 1 40 47 11 24 5 34 30 42 25 25 24 15 3 21 31 25 8 39 5 13 24 3 3 17 10 27 37 28 29 5 45 45 45 7 6 11 7 45 47 38 20 41 47 41 12 44 14 27 50 35 38 42 41 41 26 23 33 50 21 31 8 15 7 28 28 16 4 43 19 22 28 8 39 6 23 35 35 10 12 21 27 15 9 44 37 15 18 31 27 37 31 12 17 16 1 29 13 47 29 22 2 7 3 36 11 31 31 40 50 11 39 29 1 1 38 15 32 9 1 11 42 32 25 27 42 43 47 26 32 44 49 25 50 12 29 29 37 30 36 11 33 44 13 17 34 17 18 12 27 27 46 28 43 31 30 47 18 4 46 6 42 33 1 41 20 37 33 7 13 17 15 14 27 25 12 46 35 47 3 22 40 46 38 25 24 22 34 1 7 41 16 38 18 47 2 35 4 15 39 39 36 49 49 11 20 21 19 5 10 21 18 43 1 12 18 41 18 43 33 15 12 47 45 14 38 36 38 20 10 2 20 46 50 46 13 8 37 8 28 10 18 45 47 33 24 37 33 20 50 18 43 26 30 42 43 24 5 21 21 2 8 38 12 20 17 35 19 6 19 24 18 8 32 39 29 47 44 24 37 44 14 7 6 32 39 8 12 21 45 12 38 15 39 36 25 26 13 46 38 35 16 34 14 38 8 30 29 48 1 9 27 1 4 40 39 28 36 18 49 14 44 33 13 40 3 9 41 43 46 9 49 17 34 36 29 16 16 29 2 32 8 1 37 21 10 3 49 17 16 46 50 30 38 33 47 16 5 25 30 42 24 29 35 39 41 30 50 25 27 4 11 38 11 10 47 36 22 33 1 31 38 21 7 1 50 46 49 47 30 36 43 39 37 42 9 45 7 21 38 36 40 37 24 45 1 16 36 2 49 35 15 49 9 41 4 44 46 42 32 12 44 18 16 48 26 42 2 48 28 33 46 37 43 17 36 2 36 36 1 17 43 2 20 26 9 38 28 46 9 9 3 20 47 12 10 42 25 4 39 47 24 28 33 25 3 4 45 43 8 6 20 13 41 16 3 28 41 35 26 47 40 24 41 41 19 49 28 40 39 46 50 42 42 19 33 7 16 8 47 24 21 50 17 13 33 9 5 3 29 6 33 10 37 34 15 24 10 30 46 20 23 18 42 8 28 24 1 21 32 43 21 4 49 11 21 4 34 16 11 38 27 27 30 43 48 21 21 26 32 22 32 9 7 5 26 50 12 44 1 31 47 26 40 8 29 50 4 46 46 43 47 4 23 43 33 3 35 21 42 37
样例输出
43.426932 23.749534 2.000000 9.438202 23.749534 19.277398 8.545455 8.545455 5.000000 38.954796 30.904952 23.749534 13.910841 29.116097 2.000000 28.221670 14.805260 9.438202 5.846154 6.761905 30.010524 37.165942 11.227468 6.761905 24.643961 43.426932 21.960680 29.116097 5.000000 45.215787 10.333333 39.849224 36.271515 28.221670 16.594116 3.333333 27.327243 24.643961 14.805260 29.116097 39.849224 24.643961 31.799379 44.321360 4.000000 40.743651 15.699690 18.382971 4.000000 28.221670 28.221670 5.000000 30.010524 42.532505 28.221670 3.333333 13.910841 34.482660 18.382971 28.221670 37.165942 25.538389 2.000000 8.545455 44.321360 24.643961 33.588233 18.382971 7.647059 44.321360 29.116097 38.060369 16.594116 13.016393 35.377088 14.805260 10.333333 42.532505 19.277398 8.545455 10.333333 2.000000 2.000000 4.000000 20.171825 32.693806 30.904952 36.271515 37.165942 20.171825 11.227468 21.066253 5.000000 34.482660 22.855107 5.846154 24.643961 5.846154 9.438202 20.171825 45.215787 10.333333 38.060369 45.215787 3.333333 5.846154 7.647059 25.538389 22.855107 15.699690 38.060369 7.647059 29.116097 14.805260 17.488544 28.221670 21.960680 9.438202 34.482660 31.799379 6.761905 17.488544 30.904952 23.749534 7.647059 30.904952 4.000000 4.000000 38.060369 15.699690 26.432816 2.000000 41.638078 41.638078 35.377088 43.426932 38.954796 20.171825 32.693806 29.116097 10.333333 21.960680 15.699690 10.333333 12.122016 39.849224 2.000000 13.016393 44.321360 45.215787 41.638078 7.647059 15.699690 20.171825 17.488544 33.588233 45.215787 42.532505 9.438202 3.333333 3.333333 45.215787 15.699690 21.960680 23.749534 24.643961 24.643961 27.327243 36.271515 23.749534 22.855107 38.060369 16.594116 37.165942 39.849224 22.855107 18.382971 13.016393 23.749534 39.849224 38.954796 21.960680 14.805260 37.165942 27.327243 27.327243 9.438202 32.693806 43.426932 10.333333 4.000000 32.693806 13.910841 33.588233 6.761905 8.545455 18.382971 15.699690 21.960680 18.382971 24.643961 33.588233 7.647059 5.000000 2.000000 15.699690 35.377088 38.060369 19.277398 21.960680 42.532505 42.532505 5.000000 21.066253 8.545455 29.116097 9.438202 14.805260 24.643961 30.904952 7.647059 7.647059 43.426932 17.488544 25.538389 28.221670 37.165942 17.488544 42.532505 5.000000 37.165942 36.271515 6.761905 15.699690 25.538389 30.010524 30.010524 8.545455 20.171825 2.000000 19.277398 3.333333 44.321360 29.116097 37.165942 12.122016 2.000000 28.221670 2.000000 40.743651 3.333333 41.638078 32.693806 32.693806 38.954796 15.699690 20.171825 40.743651 24.643961 36.271515 9.438202 3.333333 33.588233 13.016393 37.165942 44.321360 5.846154 2.000000 35.377088 13.910841 39.849224 22.855107 43.426932 42.532505 23.749534 17.488544 19.277398 4.000000 42.532505 45.215787 21.960680 35.377088 28.221670 39.849224 24.643961 21.066253 33.588233 7.647059 30.010524 28.221670 45.215787 43.426932 17.488544 41.638078 10.333333 41.638078 21.066253 39.849224 23.749534 5.846154 42.532505 34.482660 15.699690 16.594116 41.638078 40.743651 18.382971 45.215787 4.000000 6.761905 25.538389 31.799379 13.910841 24.643961 15.699690 7.647059 42.532505 29.116097 38.954796 36.271515 28.221670 42.532505 33.588233 26.432816 43.426932 23.749534 38.060369 6.761905 44.321360 42.532505 27.327243 3.333333 8.545455 6.761905 44.321360 45.215787 41.638078 41.638078 13.910841 8.545455 17.488544 12.122016 5.000000 44.321360 13.910841 38.954796 11.227468 9.438202 38.954796 5.846154 13.016393 33.588233 7.647059 13.016393 13.910841 33.588233 13.016393 25.538389 34.482660 28.221670 18.382971 31.799379 24.643961 17.488544 21.066253 5.000000 23.749534 35.377088 13.910841 17.488544 5.000000 18.382971 30.904952 45.215787 13.910841 29.116097 2.000000 43.426932 8.545455 23.749534 5.000000 38.060369 29.116097 26.432816 25.538389 18.382971 44.321360 23.749534 30.010524 9.438202 15.699690 19.277398 21.066253 18.382971 29.116097 7.647059 42.532505 24.643961 24.643961 5.000000 10.333333 38.954796 45.215787 29.116097 28.221670 32.693806 38.060369 42.532505 5.846154 9.438202 13.016393 38.954796 33.588233 25.538389 7.647059 36.271515 3.333333 13.016393 3.333333 13.016393 6.761905 3.333333 11.227468 25.538389 30.010524 35.377088 21.960680 25.538389 21.066253 21.066253 11.227468 28.221670 20.171825 3.333333 2.000000 28.221670 44.321360 45.215787 11.227468 2.000000 23.749534 4.000000 13.016393 30.904952 16.594116 22.855107 13.910841 13.016393 17.488544 17.488544 3.333333 30.904952 24.643961 25.538389 41.638078 14.805260 38.060369 34.482660 24.643961 14.805260 39.849224 13.910841 28.221670 27.327243 9.438202 7.647059 37.165942 43.426932 27.327243 23.749534 30.904952 16.594116 14.805260 10.333333 2.000000 19.277398 39.849224 18.382971 33.588233 20.171825 9.438202 13.016393 2.000000 2.000000 33.588233 30.010524 6.761905 17.488544 41.638078 16.594116 8.545455 38.060369 38.954796 4.000000 30.904952 18.382971 35.377088 38.060369 8.545455 31.799379 2.000000 3.333333 35.377088 34.482660 45.215787 5.000000 18.382971 5.000000 42.532505 20.171825 45.215787 34.482660 33.588233 2.000000 12.122016 2.000000 28.221670 3.333333 23.749534 30.010524 28.221670 37.165942 30.904952 7.647059 17.488544 9.438202 41.638078 13.016393 8.545455 9.438202 38.954796 21.066253 26.432816 45.215787 37.165942 13.016393 3.333333 12.122016 4.000000 5.846154 28.221670 14.805260 28.221670 14.805260 6.761905 25.538389 27.327243 25.538389 9.438202 14.805260 24.643961 34.482660 40.743651 20.171825 8.545455 43.426932 25.538389 11.227468 36.271515 38.060369 21.960680 12.122016 6.761905 7.647059 25.538389 4.000000 41.638078 17.488544 4.000000 6.761905 15.699690 36.271515 44.321360 38.060369 42.532505 23.749534 32.693806 10.333333 5.846154 13.016393 21.960680 6.761905 31.799379 12.122016 29.116097 16.594116 31.799379 29.116097 39.849224 42.532505 26.432816 13.016393 20.171825 4.000000 41.638078 16.594116 32.693806 25.538389 6.761905 21.066253 34.482660 29.116097 16.594116 37.165942 25.538389 44.321360 24.643961 20.171825 5.846154 36.271515 36.271515 16.594116 27.327243 2.000000 26.432816 16.594116 27.327243 26.432816 26.432816 36.271515 7.647059 9.438202 37.165942 21.960680 30.010524 41.638078 42.532505 16.594116 26.432816 10.333333 4.000000 24.643961 19.277398 36.271515 23.749534 7.647059 27.327243 38.954796 11.227468 5.846154 32.693806 17.488544 23.749534 18.382971 34.482660 29.116097 19.277398 13.910841 3.333333 23.749534 13.016393 34.482660 4.000000 29.116097 13.016393 45.215787 15.699690 23.749534 22.855107 14.805260 42.532505 41.638078 22.855107 28.221670 37.165942 20.171825 5.846154 5.000000 19.277398 33.588233 20.171825 25.538389 16.594116 30.010524 31.799379 42.532505 36.271515 4.000000 30.904952 9.438202 2.000000 3.333333 27.327243 6.761905 27.327243 21.960680 13.910841 2.000000 22.855107 17.488544 8.545455 33.588233 21.960680 3.333333 39.849224 33.588233 23.749534 10.333333 16.594116 40.743651 30.904952 15.699690 17.488544 20.171825 38.060369 14.805260 30.904952 20.171825 3.333333 30.010524 31.799379 10.333333 37.165942 44.321360 36.271515 22.855107 5.000000 18.382971 21.066253 28.221670 7.647059 25.538389 17.488544 8.545455 35.377088 35.377088 34.482660 24.643961 2.000000 30.010524 43.426932 7.647059 8.545455 25.538389 43.426932 3.333333 20.171825 20.171825 44.321360 6.761905 26.432816 34.482660 15.699690 9.438202 25.538389 38.060369 19.277398 34.482660 33.588233 5.000000 38.954796 44.321360 20.171825 24.643961 37.165942 35.377088 12.122016 21.066253 32.693806 12.122016 32.693806 43.426932 12.122016 35.377088 32.693806 21.066253 39.849224 15.699690 33.588233 39.849224 20.171825 35.377088 18.382971 29.116097 18.382971 26.432816 31.799379 28.221670 41.638078 5.000000 2.000000 26.432816 37.165942 39.849224 38.954796 13.910841 2.000000 28.221670 3.333333 9.438202 5.846154 40.743651 9.438202 13.910841 20.171825 11.227468 23.749534 9.438202 35.377088 11.227468 9.438202 35.377088 4.000000 21.960680 15.699690 16.594116 11.227468 34.482660 23.749534 38.954796 10.333333 6.761905 10.333333 40.743651 30.010524 32.693806 14.805260 13.016393 22.855107 38.954796 30.904952 44.321360 43.426932 32.693806 27.327243 9.438202 30.010524 21.066253 38.954796 17.488544 23.749534 14.805260 38.954796 12.122016 34.482660 16.594116 44.321360 20.171825 7.647059 37.165942 12.122016 22.855107 13.910841 13.910841 12.122016 13.910841 6.761905 42.532505 21.066253 5.846154 25.538389 38.954796 17.488544 10.333333 34.482660 23.749534 4.000000 18.382971 24.643961 26.432816 5.000000 40.743651 25.538389 8.545455 27.327243 30.010524 15.699690 37.165942 12.122016 38.954796 12.122016 8.545455 12.122016 30.904952 7.647059 20.171825 25.538389 38.060369 44.321360 22.855107 43.426932 23.749534 38.060369 19.277398 35.377088 6.761905 30.010524 41.638078 21.066253 5.846154 44.321360 17.488544 42.532505 43.426932 22.855107 13.910841 12.122016 22.855107 6.761905 13.016393 22.855107 5.846154 42.532505 36.271515 13.910841 18.382971 41.638078 14.805260 39.849224 2.000000 21.066253 9.438202 11.227468 5.000000 6.761905 9.438202 26.432816 38.954796 26.432816 35.377088 33.588233 31.799379 6.761905 31.799379 25.538389 2.000000 27.327243 25.538389 22.855107 19.277398 37.165942 2.000000 19.277398 23.749534 21.066253 33.588233 38.060369 45.215787 21.066253 35.377088 3.333333 7.647059 4.000000 13.910841 37.165942 8.545455 23.749534 11.227468 39.849224 39.849224 20.171825 38.954796 39.849224 27.327243 15.699690 27.327243 21.960680 15.699690 13.016393 21.066253 45.215787 38.060369 7.647059 21.066253 38.954796 23.749534 30.904952 2.000000 18.382971 32.693806 39.849224 23.749534 29.116097 5.846154 10.333333 21.066253 24.643961 13.910841 39.849224 38.060369 9.438202 9.438202 17.488544 18.382971 13.016393 21.960680 23.749534 7.647059 42.532505 28.221670 40.743651 5.000000 21.960680 17.488544 41.638078 26.432816 13.910841 2.000000 14.805260 38.060369