結果
| 問題 | No.275 中央値を求めよ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-04 16:00:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 205 bytes |
| 記録 | |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2026-06-02 06:44:20 |
| 合計ジャッジ時間 | 3,326 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 28 WA * 10 |
ソースコード
import math N = int(input()) A = map(int,input().split()) # 昇順ソート A = sorted(A) if N % 2 == 0: print(int((A[(N-1) // 2] + A[math.ceil((N-1) / 2)]) / 2)) else: print(A[int(N / 2)])