結果
| 問題 | No.275 中央値を求めよ |
| コンテスト | |
| ユーザー |
steek79
|
| 提出日時 | 2015-10-13 00:09:12 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 1,000 ms |
| コード長 | 350 bytes |
| 記録 | |
| コンパイル時間 | 148 ms |
| コンパイル使用メモリ | 77,376 KB |
| 最終ジャッジ日時 | 2025-12-03 17:26:08 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
N = int(input())
scores = map (int, raw_input().split())
if len(scores) % 2 == 1:
while len(scores) > 1:
scores.remove(max(scores))
scores.remove(min(scores))
median = scores[0]
else:
while len(scores) > 2:
scores.remove(max(scores))
scores.remove(min(scores))
median = sum(scores)/2.0
print median
steek79