結果

問題 No.275 中央値を求めよ
ユーザー gim
提出日時 2017-06-15 15:25:28
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 02:16:44
合計ジャッジ時間 1,859 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 24 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

N=raw_input()
A=raw_input()
L=map(int, A.split())
L.sort()

if len(L)%2==0:
    print float(L[(int(N)/2)-1]+L[int(N)/2])/2
else:
    print L[(int(N)/2)-1]
0