結果

問題 No.275 中央値を求めよ
ユーザー kutsutama
提出日時 2018-02-27 22:53:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 182 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-30 11:59:07
合計ジャッジ時間 2,119 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 20 WA * 15 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [int(x) for x in input().split()]
a.sort()

res = 0
if n % 2 != 0:
  res = a[n // 2]
else:
  res = (a[n // 2] + a[n // 2 + 1]) / 2

print('{0:.1f}'.format(res))
0