結果

問題 No.275 中央値を求めよ
ユーザー brthyyjpbrthyyjp
提出日時 2020-10-09 18:15:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 1,000 ms
コード長 133 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-09-27 13:04:10
合計ジャッジ時間 4,947 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,228 KB
testcase_01 AC 64 ms
71,348 KB
testcase_02 AC 66 ms
71,348 KB
testcase_03 AC 65 ms
71,292 KB
testcase_04 AC 66 ms
71,192 KB
testcase_05 AC 69 ms
71,308 KB
testcase_06 AC 64 ms
71,288 KB
testcase_07 AC 62 ms
71,284 KB
testcase_08 AC 64 ms
71,356 KB
testcase_09 AC 64 ms
71,416 KB
testcase_10 AC 65 ms
71,208 KB
testcase_11 AC 66 ms
71,360 KB
testcase_12 AC 60 ms
71,076 KB
testcase_13 AC 62 ms
71,336 KB
testcase_14 AC 65 ms
71,356 KB
testcase_15 AC 64 ms
71,120 KB
testcase_16 AC 65 ms
71,196 KB
testcase_17 AC 64 ms
71,160 KB
testcase_18 AC 63 ms
71,384 KB
testcase_19 AC 64 ms
71,412 KB
testcase_20 AC 63 ms
71,340 KB
testcase_21 AC 66 ms
71,460 KB
testcase_22 AC 64 ms
71,272 KB
testcase_23 AC 64 ms
70,984 KB
testcase_24 AC 66 ms
71,232 KB
testcase_25 AC 64 ms
71,128 KB
testcase_26 AC 64 ms
71,300 KB
testcase_27 AC 65 ms
71,164 KB
testcase_28 AC 67 ms
71,156 KB
testcase_29 AC 66 ms
71,256 KB
testcase_30 AC 66 ms
71,100 KB
testcase_31 AC 69 ms
71,416 KB
testcase_32 AC 66 ms
71,200 KB
testcase_33 AC 66 ms
71,416 KB
testcase_34 AC 68 ms
71,452 KB
testcase_35 AC 66 ms
71,108 KB
testcase_36 AC 67 ms
71,312 KB
testcase_37 AC 65 ms
71,300 KB
testcase_38 AC 65 ms
71,424 KB
testcase_39 AC 68 ms
70,980 KB
testcase_40 AC 67 ms
71,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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