#K83222. Taco Gadget Recharge Time
Taco Gadget Recharge Time
Taco Gadget Recharge Time
You are given a number of gadgets each with an associated recharge time. To ensure that all gadgets are fully recharged, you need to calculate the total recharge time required for each test case, which is determined by the gadget with the longest recharge time. In other words, given a list of recharge times for each gadget, the answer is the maximum value in that list.
Mathematically, for a list (a_1, a_2, \dots, a_n), the total recharge time is given by: [ T = \max{a_1, a_2, \dots, a_n} ]
The input begins with an integer T representing the number of test cases. For each test case, the first line contains an integer n, the number of gadgets, followed by a line of n space-separated integers representing the recharge times of the gadgets. Your task is to output the total recharge time for each test case.
inputFormat
The first line contains a single integer T, the number of test cases. For each test case, the first line contains an integer n, the number of gadgets. The second line contains n space-separated integers representing the recharge times for the gadgets.
outputFormat
For each test case, output a single line containing the total recharge time required - that is, the maximum recharge time among the gadgets.## sample
1
4
2 3 4 2
4
</p>