結果

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

ソースコード

diff #
raw source code

n = input()
a = map(int, raw_input().split())
a.sort()
if len(a) % 2 == 0:
  print (a[n/2 - 1] + a[n/2]) / 2.0
else:
  print a[n/2]
0