JJ loves playing with averages. He has an array
of length . He wants to divide the array into two non-empty subsets and such that the value of is as large as possible. (Note that each must belong to either subset or subset ).
Help him find this maximum value of .
As a reminder, the mean of a subset of size is defined as: .
For example, .
Input Format
- The first line contains - the number of test cases. Then the test cases follow.
- The first line of each test case contains an integer - the size of the array .
- The second line of each test case contains space-separated integers denoting the array .
Output Format
Output the largest value of .
Your answer is considered correct if its absolute or relative error does not exceed .
Formally, let your answer be , and the jury's answer be . Your answer is accepted if and only if .
Constraints
Sample Input 1
2
2
4 5
5
2 2 2 2 2
Sample Output 1
9.000000
4.000000
Explanation
Test case-1: We can divide the two elements into two non-empty subsets and as follows: , .
Therefore, .
Test case-2: In whatever way we divide the elements of the array, mean of both the subsets will always be .
Therefore, .
ConversionConversion EmoticonEmoticon