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.
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.
For each test case , output a single integer denoting the minimum contribution by the chief.
3 4 2 1 5
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.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.