結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2021-04-04 15:59:11 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 217 bytes |
コンパイル時間 | 1,376 ms |
コンパイル使用メモリ | 82,020 KB |
実行使用メモリ | 54,272 KB |
最終ジャッジ日時 | 2024-12-27 20:04:18 |
合計ジャッジ時間 | 5,790 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 38 |
ソースコード
import math N = int(input()) A = map(int,input().split()) # 昇順ソート A = sorted(A) print(A) if N % 2 == 0: print(int((A[(N-1) // 2] + A[math.ceil((N-1) / 2)]) / 2)) else: print(A[int(N / 2)])