結果

問題 No.275 中央値を求めよ
ユーザー DexctersuDexctersu
提出日時 2017-09-08 16:08:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 120 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-24 20:09:26
合計ジャッジ時間 2,572 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 27 ms
10,624 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 26 ms
10,624 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 RE -
testcase_11 AC 26 ms
10,624 KB
testcase_12 RE -
testcase_13 AC 27 ms
10,624 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 26 ms
10,752 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 26 ms
10,880 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 AC 26 ms
10,880 KB
testcase_27 AC 26 ms
10,752 KB
testcase_28 AC 24 ms
10,624 KB
testcase_29 AC 25 ms
10,752 KB
testcase_30 AC 25 ms
10,624 KB
testcase_31 RE -
testcase_32 AC 25 ms
10,624 KB
testcase_33 AC 25 ms
10,880 KB
testcase_34 AC 25 ms
10,624 KB
testcase_35 AC 25 ms
10,752 KB
testcase_36 AC 24 ms
10,880 KB
testcase_37 RE -
testcase_38 RE -
testcase_39 AC 27 ms
10,752 KB
testcase_40 AC 27 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2!=0:
    print(a[n//2])
else:
    print((a[n]+a[n-1])/2)
0