結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2019-03-30 23:24:54 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 1,000 ms |
コード長 | 166 bytes |
コンパイル時間 | 722 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-11-17 10:38:48 |
合計ジャッジ時間 | 3,048 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
N = int(input())A = sorted(list(map(int, input().split())))if len(A) % 2 != 0:print(A[len(A) // 2])else:print((A[len(A) // 2] + A[len(A) // 2 - 1]) / 2)