結果
| 問題 | No.275 中央値を求めよ |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2022-11-28 19:25:56 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 1,000 ms |
| + 165µs | |
| コード長 | 178 bytes |
| 記録 | |
| コンパイル時間 | 76 ms |
| コンパイル使用メモリ | 80,640 KB |
| 実行使用メモリ | 54,784 KB |
| 最終ジャッジ日時 | 2026-09-10 18:49:58 |
| 合計ジャッジ時間 | 3,146 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
A.sort()
if len(A) % 2 == 0:
p = N // 2 - 1
m = sum(A[p:p+2]) / 2
print(m)
else:
m = A[N // 2]
print(m)
norioc