andy6804tw
2/17/2017 - 1:43 PM

http://e-tutor.itsa.org.tw/e-Tutor/mod/programming/view.php?id=30064

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n=scn.nextInt(),arr[]=new int [n];
		for(int i=0;i<n;i++)
			arr[i]=scn.nextInt();
		Arrays.sort(arr);
		System.out.println(arr[n/2]);
	}
	/*題目:[C_MM353-易] 找出一串輸入數字的中位數
    作者:1010
    時間:西元 2017 年 2 月 */
}