結果

問題 No.275 中央値を求めよ
ユーザー souhei o
提出日時 2022-12-03 05:05:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 177 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-10 07:05:27
合計ジャッジ時間 2,693 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
L = sorted(list(map(int, input().split())))

if N%2==0:
    ind1=int(N/2)-1
    ind2=ind1+1
    print((L[ind1]+L[ind2])/2)
else:
    ind1=int(N/2)
    print(L[ind1])
0