結果
問題 |
No.275 中央値を求めよ
|
ユーザー |
![]() |
提出日時 | 2023-02-09 03:58:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 1,000 ms |
コード長 | 130 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 82,036 KB |
実行使用メモリ | 53,940 KB |
最終ジャッジ日時 | 2024-07-06 11:06:41 |
合計ジャッジ時間 | 2,996 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
N=int(input()) A=[int(i) for i in input().split()] A.sort() if N%2==1: print(A[N//2]) else: print((A[N//2]+A[-1+N//2])/2)