結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2021-04-04 16:00:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 205 bytes |
コンパイル時間 | 842 ms |
コンパイル使用メモリ | 81,664 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-12-27 20:06:27 |
合計ジャッジ時間 | 3,100 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)])