結果

問題 No.275 中央値を求めよ
ユーザー 👑 KazunKazun
提出日時 2020-05-31 03:23:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 124 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 53,924 KB
最終ジャッジ日時 2024-04-27 14:57:34
合計ジャッジ時間 2,586 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,556 KB
testcase_01 AC 37 ms
52,088 KB
testcase_02 AC 33 ms
53,096 KB
testcase_03 AC 33 ms
52,816 KB
testcase_04 AC 33 ms
52,356 KB
testcase_05 AC 34 ms
51,900 KB
testcase_06 AC 35 ms
52,548 KB
testcase_07 AC 34 ms
52,732 KB
testcase_08 AC 34 ms
53,320 KB
testcase_09 AC 35 ms
52,332 KB
testcase_10 AC 34 ms
52,112 KB
testcase_11 AC 33 ms
52,664 KB
testcase_12 AC 36 ms
53,008 KB
testcase_13 AC 33 ms
52,692 KB
testcase_14 AC 34 ms
51,956 KB
testcase_15 AC 34 ms
53,216 KB
testcase_16 AC 34 ms
53,904 KB
testcase_17 AC 33 ms
52,552 KB
testcase_18 AC 33 ms
52,368 KB
testcase_19 AC 33 ms
52,764 KB
testcase_20 AC 33 ms
52,772 KB
testcase_21 AC 35 ms
53,012 KB
testcase_22 AC 33 ms
52,736 KB
testcase_23 AC 33 ms
53,924 KB
testcase_24 AC 33 ms
52,736 KB
testcase_25 AC 34 ms
52,820 KB
testcase_26 AC 33 ms
52,668 KB
testcase_27 AC 33 ms
52,424 KB
testcase_28 AC 33 ms
52,312 KB
testcase_29 AC 34 ms
52,944 KB
testcase_30 AC 34 ms
52,976 KB
testcase_31 AC 35 ms
53,356 KB
testcase_32 AC 32 ms
52,252 KB
testcase_33 AC 33 ms
53,696 KB
testcase_34 AC 34 ms
52,460 KB
testcase_35 AC 34 ms
52,260 KB
testcase_36 AC 34 ms
52,216 KB
testcase_37 AC 33 ms
52,580 KB
testcase_38 AC 35 ms
52,588 KB
testcase_39 AC 33 ms
53,148 KB
testcase_40 AC 34 ms
52,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

A=list(map(int,input().split()))

A.sort()
if N%2:
    print(A[N//2])
else:
    print((A[N//2]+A[N//2-1])/2)
0