#K49517. Sum of the Largest and Smallest
Sum of the Largest and Smallest
Sum of the Largest and Smallest
You are given T test cases. For each test case, a list of space-separated integers is provided. Your task is to compute the sum of the smallest and largest integers in each test case.
More formally, for each test case with a list of integers \(a_1, a_2, \dots, a_n\), find \(min = \min_{1\leq i\leq n} a_i\) and \(max = \max_{1\leq i\leq n} a_i\) and output \(min + max\).
Input is read from standard input (stdin) and output must be printed to standard output (stdout), with each result on a new line.
inputFormat
The first line contains an integer T representing the number of test cases. Each of the next T lines contains a test case: a space-separated list of integers.
outputFormat
For each test case, output a single line containing the sum of the smallest and largest integers of that test case.
## sample3
5 7 2 9 1
4 2 8 6
13 13 13 13
10
10
26
</p>