結果

問題 No.609 Noelちゃんと星々
ユーザー kryu_______2740kryu_______2740
提出日時 2018-02-22 14:41:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 23,540 KB
最終ジャッジ日時 2024-04-08 16:46:29
合計ジャッジ時間 4,480 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
20,940 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 79 ms
16,548 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 90 ms
17,820 KB
testcase_08 AC 59 ms
13,568 KB
testcase_09 AC 76 ms
15,932 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 109 ms
20,272 KB
testcase_13 WA -
testcase_14 AC 53 ms
13,184 KB
testcase_15 WA -
testcase_16 AC 138 ms
23,204 KB
testcase_17 AC 119 ms
20,952 KB
testcase_18 AC 71 ms
15,344 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import statistics as st

N = int(input())
Y = list(map(int,input().split()))


#print(Y)

#中央値の算出~距離を算出
median = 0.
distance = 0

median = st.median(Y)
for i in range(N):
    distance = distance + abs(median-Y[i])
print(distance)
0