結果

問題 No.275 中央値を求めよ
ユーザー gorugo30gorugo30
提出日時 2021-02-22 23:34:48
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 88 ms / 1,000 ms
コード長 146 bytes
コンパイル時間 268 ms
使用メモリ 75,880 KB
最終ジャッジ日時 2022-11-20 21:43:10
合計ジャッジ時間 5,671 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 85 ms
75,784 KB
testcase_01 AC 82 ms
75,856 KB
testcase_02 AC 82 ms
75,512 KB
testcase_03 AC 85 ms
75,524 KB
testcase_04 AC 85 ms
75,728 KB
testcase_05 AC 85 ms
75,528 KB
testcase_06 AC 85 ms
75,736 KB
testcase_07 AC 84 ms
75,572 KB
testcase_08 AC 85 ms
75,648 KB
testcase_09 AC 85 ms
75,380 KB
testcase_10 AC 86 ms
75,784 KB
testcase_11 AC 86 ms
75,488 KB
testcase_12 AC 87 ms
75,720 KB
testcase_13 AC 85 ms
75,536 KB
testcase_14 AC 86 ms
75,500 KB
testcase_15 AC 84 ms
75,800 KB
testcase_16 AC 84 ms
75,540 KB
testcase_17 AC 84 ms
75,520 KB
testcase_18 AC 83 ms
75,880 KB
testcase_19 AC 84 ms
75,456 KB
testcase_20 AC 88 ms
75,548 KB
testcase_21 AC 86 ms
75,512 KB
testcase_22 AC 85 ms
75,812 KB
testcase_23 AC 86 ms
75,436 KB
testcase_24 AC 86 ms
75,880 KB
testcase_25 AC 87 ms
75,760 KB
testcase_26 AC 84 ms
75,548 KB
testcase_27 AC 86 ms
75,872 KB
testcase_28 AC 83 ms
75,760 KB
testcase_29 AC 85 ms
75,672 KB
testcase_30 AC 83 ms
75,820 KB
testcase_31 AC 83 ms
75,660 KB
testcase_32 AC 84 ms
75,648 KB
testcase_33 AC 81 ms
75,664 KB
testcase_34 AC 81 ms
75,740 KB
testcase_35 AC 84 ms
75,784 KB
testcase_36 AC 85 ms
75,780 KB
testcase_37 AC 85 ms
75,800 KB
testcase_38 AC 83 ms
75,720 KB
testcase_39 AC 83 ms
75,496 KB
testcase_40 AC 84 ms
75,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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