結果

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

ソースコード

diff #
raw source code

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

A.sort()
if N % 2 == 1:
    print A[N / 2]
else:
    total = 1.0 * (A[N / 2] + A[N / 2 - 1]) / 2
    print total
0