結果

問題 No.275 中央値を求めよ
ユーザー tomosuto
提出日時 2016-10-19 23:12:22
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 134 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 7,076 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-06-25 00:07:06
合計ジャッジ時間 1,748 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
A = sorted(map(float, raw_input().split()))
if N % 2 == 0:
    print (A[N/2-1]+A[N/2]) / 2
else:
    print A[N/2]
0