Medium

12.31%

In a town , the Chief Council of Ministers has decided to contribute funds raised from various sources in their department for the Central Public Welfare Initiatives. Given the contribution of N ministers Ai, where i represents the contribution of the ith minister, what should be the least contribution from the chief such that the Nth power of his share is atleast equal to the product of contributions of all his subordinates.

**Input: **

First line of input contains the number of test cases , T. First line of each test case contains the number of ministers,N . Second line of each test case contains n space seperated values (A1 TO An) denoting the contribution of N ministers.

**Output:**

For each test case , output a single integer denoting the minimum contribution by the chief.

**Constraints: **

1<=T<=100

1<=N<=1000

1<=Ai<=100

**Example:**

**Input:**

1

5

3 4 2 1 5

**Output: **

3

**Explanation:**

The product of the contributions is : 3*4*2*1*5=120. minimum integer value whose 5th power is atleast equal to the product is 3.