結果

問題 No.275 中央値を求めよ
ユーザー TKTK
提出日時 2023-09-18 22:01:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 137 bytes
コンパイル時間 1,088 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-09-18 22:01:31
合計ジャッジ時間 2,862 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,868 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 RE -
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 16 ms
7,808 KB
testcase_06 AC 16 ms
7,928 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 15 ms
7,872 KB
testcase_11 RE -
testcase_12 AC 16 ms
7,732 KB
testcase_13 RE -
testcase_14 AC 16 ms
7,748 KB
testcase_15 AC 16 ms
7,856 KB
testcase_16 AC 16 ms
7,948 KB
testcase_17 AC 16 ms
7,940 KB
testcase_18 AC 16 ms
7,936 KB
testcase_19 RE -
testcase_20 AC 16 ms
7,728 KB
testcase_21 AC 16 ms
7,892 KB
testcase_22 AC 16 ms
7,788 KB
testcase_23 RE -
testcase_24 AC 15 ms
7,936 KB
testcase_25 AC 16 ms
7,892 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 16 ms
7,800 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 AC 15 ms
7,832 KB
testcase_38 AC 15 ms
7,824 KB
testcase_39 RE -
testcase_40 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N= int(input())
L = list(map(int,input().split()))
l = sorted(L)
if N%2 == 0:
    print((l[N//2-1]+l[N//2])/2)
else:
    print(l[N-1//2])
0