結果
| 問題 | No.275 中央値を求めよ |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2022-11-28 19:25:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 1,000 ms |
| コード長 | 178 bytes |
| 記録 | |
| コンパイル時間 | 989 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-04-21 05:27:47 |
| 合計ジャッジ時間 | 4,749 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / 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