結果
| 問題 |
No.275 中央値を求めよ
|
| コンテスト | |
| ユーザー |
kotatsu
|
| 提出日時 | 2023-08-15 19:33:59 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 189 bytes |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-24 04:00:49 |
| 合計ジャッジ時間 | 2,227 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 8 WA * 30 |
ソースコード
N = int(input())
numbers = list(map(int, input().split()))
numbers.sort()
if N%2 != 0:
median = (numbers[N//2 - 1] + numbers[N//2]) / 2
else:
median = numbers[N//2]
print(median)
kotatsu