Given the marks of all students, calculate the median.
Answers
Answered by
0
Answer:
Given the marks of all students, calculate the median.
Input:
The first line of input takes the number of test cases, T. For each test case there will be two lines. The first line contains an integer N denoting the number of students, and second line contains N space seperated integers which denotes the marks of N students.
Output:
Print the floor value of the median for each test case on a new line.
Constraints:
1 <= T <= 100
1 <= N <= 100
1 <= Marks <= 100
Example:
Input:
3
4
56 67 30 79
4
78 89 67 76
5
90 100 78 89 67
Output:
61
77
89
Similar questions
Math,
6 months ago
English,
6 months ago
English,
6 months ago
Math,
1 year ago
Environmental Sciences,
1 year ago