문제1590--AverageAverage

1590: AverageAverage

실행시간 제한: 1 Sec  메모리사용 제한: 128 MB
제출: 221  통과: 149
[제출] [채점기록] [묻고답하기]

문제 설명

Given a int[] numList, for each non-empty subset of numList, compute the average of its elements, then print the average of those averages.

입력 설명

The first line of the input gives the number of test cases, T (1 <= T <= 200).

The first line of each test case contains a positive integer N (1 <= N <= 8), the number of integers in numList. The second line of each test cases contains N integers, where absolute number of each integer is same or less than 1000.

출력 설명

For each test case, print the calculated value as printed in the problem statement, in one line.

Round the value with exactly one digit after the decimal point. Sorry for the inconvenience caused. 

입력 예시 Copy

3
3
1 2 3
1
42
5
3 1 4 15 9

출력 예시 Copy

2.0
42.0
6.4

출처/분류