結果

問題 No.275 中央値を求めよ
ユーザー NASANASA
提出日時 2017-04-21 17:30:32
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-09-27 11:01:05
合計ジャッジ時間 2,630 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

n=int(input())
a=input().split()
a.sort()
if n%2==0:
    P=int(a[int(n/2-1)])+int(a[int(n/2)])
    print(P/2)
else:
    r=len(a)/2+1
    print(int(a[f]))

0