#CCBCHBA0000124. Trung bình của nhiều dãy (Average of Several Number Lists)

Trung bình của nhiều dãy (Average of Several Number Lists)

Average of Several Number Lists

Source: Schaum’s Outline of Programming with C

Version: Phuoc Hung OJ Extended

Problem Statement

Given tt number lists, each with length nn and values x1,…,xnx_1,\ldots,x_n, compute their arithmetic means in input order. Print one mean per line with exactly two decimal places. Round to the nearest hundredth, breaking exact ties away from zero. Print 0.00 for a result rounded to zero (no negative zero).

Input

The first line contains integer tt. Each of the next tt lines begins with integer nn, followed by exactly nn real values separated by one space. Each real value has at most two digits after the decimal point.

Output

Print exactly tt lines, one mean per list, with exactly two digits after the decimal point.

Subtasks

  • Subtask 1 (20%): 1≤t≤31\le t\le 3; 1≤n≤301\le n\le 30 per list; −1000≤xi≤1000-1000\le x_i\le1000, at most two decimal digits.

  • Subtask 2 (30%): 1≤t≤201\le t\le 20; 1≤n≤2001\le n\le 200 per list; −1000≤xi≤1000-1000\le x_i\le1000, at most two decimal digits.

  • Subtask 3 (50%): 1≤t≤1001\le t\le 100; 1≤n≤10001\le n\le 1000 per list; −1000≤xi≤1000-1000\le x_i\le1000, at most two decimal digits.

Examples

Example 1

Input:

2
3
1 2 3
2
-0.25 0.25

Output:

2.00
0.00

Explanation:

Reset the sum for each list, divide by its length, and print the mean to two decimals.

Example 2

Input:

1
4
1.00 2.00 3.00 6.00

Output:

3.00

Explanation:

Reset the sum for each list, divide by its length, and print the mean to two decimals.