結果

問題 No.609 Noelちゃんと星々
ユーザー Naoyk1212Naoyk1212
提出日時 2017-12-14 18:23:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 160 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 21,468 KB
最終ジャッジ日時 2023-08-21 04:35:57
合計ジャッジ時間 4,274 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
18,624 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 59 ms
14,476 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 70 ms
15,388 KB
testcase_08 AC 39 ms
11,308 KB
testcase_09 AC 55 ms
13,480 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 88 ms
18,124 KB
testcase_13 WA -
testcase_14 AC 35 ms
10,900 KB
testcase_15 WA -
testcase_16 AC 111 ms
20,736 KB
testcase_17 AC 93 ms
18,548 KB
testcase_18 AC 52 ms
13,176 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from statistics import median

N = int(input())
Y = [int(x) for x in input().split()]

med = median(Y)

ans = 0
for i in Y:
    ans += abs(med - i)

print(ans)
0