結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2021-04-04 16:01:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 1,000 ms |
コード長 | 200 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-12-27 20:12:26 |
合計ジャッジ時間 | 3,273 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import mathN = int(input())A = map(int,input().split())# 昇順ソートA = sorted(A)if N % 2 == 0:print((A[(N-1) // 2] + A[math.ceil((N-1) / 2)]) / 2)else:print(A[int(N / 2)])