1096: 输出中位数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:20 Solved:6

Description

输入一串数字,输出他们的中位数(中位数:一串数字从小到大排序后最中间的数,若这串数字个数为偶数,则中位数为最中间两个数的平均值,如数字个数为7,则中位数为第四个数,数字个数为8,则中位数为第四个和第五个数的平均值)

Input

1 5 3 6 4 9 7

Output

5

Sample Input Copy

6 3 5 2 4 8

Sample Output Copy

4.5