BETA

Difficulty Level:

Easy

Total Submissions: 69 Accuracy:

27.54%

Sum of average of all subsets
     

Given an array arr of N integer elements, the task is to find sum of average of all subsets of this array.

Input:

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer N denoting the size of array A.

The second line of each test case contains N space separated integers denoting elements of the array A[ ].


Output:

Print the average of all the subsets of array A exactly upto 6 decimal places. Print the answer for each testcase in a new line.


Constraints:

1<= T <=100

1<= N <=20

1<= A[ ] <=100


Example:

Input:

1

4

2 3 5 7

Output:

63.750000

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Sujnesh Mishra

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.