Submit Best Submissions All Submissions

159. Nth Smallest Value


Problem Statement:
For this problem, you will write a program that prints the Nth smallest value in a fixed sized array of integers. To make things simple, N will be 2 and the array will always be have 10 decimal integer values.


Input Format:
The first line of input contains a single integer T, (1 ≤ T ≤ 1000), which is the number of test cases. Each case consists of a single line containing 10 integers whose values are between 1 and 1000 inclusive.


Output Format:
For each case, print on one line the 2nd value.


Sample Input:
3 1 2 3 4 5 6 7 8 9 1000 338 304 619 95 343 496 489 116 98 127 1 1 2 3 4 5 6 7 8 9


Sample Output:
2 98 1





Added by: feras_kassar
Added at: 2014-05-19 20:19:48 UTC
Time Limit: 2 seconds
Partial score: No
Source:Tishreen-CPC 2014