結果

問題 No.275 中央値を求めよ
コンテスト
ユーザー bellangeldindon
提出日時 2017-05-31 16:28:28
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 151 bytes
記録
コンパイル時間 144 ms
コンパイル使用メモリ 77,340 KB
最終ジャッジ日時 2025-12-03 23:52:49
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(raw_input())
inpt = map(int, raw_input().split())

inpt.sort()

if n % 2 == 0:
	print float(inpt[n/2-1] + inpt[n/2]) / 2
else:
	print inpt[n/2]
0