結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2021-06-10 19:03:54 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 1,000 ms |
コード長 | 139 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,604 KB |
実行使用メモリ | 53,620 KB |
最終ジャッジ日時 | 2024-11-30 05:17:22 |
合計ジャッジ時間 | 2,930 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
N = int(input()) A = sorted(list(map(int, input().split()))) m = N // 2 if N % 2 == 0: print((A[m] + A[m - 1]) / 2) else: print(A[m])