結果

問題 No.275 中央値を求めよ
ユーザー yumenomatayume
提出日時 2020-03-21 01:13:16
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 151 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 81,832 KB
実行使用メモリ 67,404 KB
最終ジャッジ日時 2024-12-16 00:19:02
合計ジャッジ時間 3,804 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2 RE * 1
other AC * 2 WA * 15 RE * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = sorted(list(map(int,input().split())))
if n%2 == 1:
    ans = a[(n+1)/2]
else:
    ans = round((a[n//2]+a[n//2+1])/2,1)
print(ans)
0