結果

問題 No.275 中央値を求めよ
ユーザー Inseo Kim
提出日時 2020-08-06 16:06:32
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 263 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-19 19:04:53
合計ジャッジ時間 2,239 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

count = int(input())
numbers = sorted(map(int, raw_input().split(" ")))

answer = 0
if count % 2 == 0:
    target = int(numbers[count // 2 - 1]) + int(numbers[count // 2])
else:
    target = int(numbers[count // 2]) * 2

answer = target / (2 * 1.0)
print(answer)
0