結果

問題 No.609 Noelちゃんと星々
ユーザー UmemiyaUmemiya
提出日時 2018-01-01 20:29:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 695 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 21,348 KB
最終ジャッジ日時 2023-08-24 15:42:45
合計ジャッジ時間 4,772 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
18,616 KB
testcase_01 AC 53 ms
14,792 KB
testcase_02 AC 47 ms
13,604 KB
testcase_03 AC 52 ms
14,940 KB
testcase_04 AC 42 ms
12,520 KB
testcase_05 AC 91 ms
20,624 KB
testcase_06 AC 81 ms
19,136 KB
testcase_07 AC 60 ms
15,588 KB
testcase_08 AC 37 ms
11,352 KB
testcase_09 AC 49 ms
13,616 KB
testcase_10 AC 68 ms
16,996 KB
testcase_11 AC 67 ms
16,212 KB
testcase_12 AC 74 ms
18,196 KB
testcase_13 AC 38 ms
11,736 KB
testcase_14 AC 33 ms
10,800 KB
testcase_15 AC 82 ms
19,152 KB
testcase_16 AC 91 ms
20,720 KB
testcase_17 AC 77 ms
18,444 KB
testcase_18 AC 45 ms
13,288 KB
testcase_19 AC 79 ms
19,296 KB
testcase_20 AC 92 ms
21,192 KB
testcase_21 AC 92 ms
21,348 KB
testcase_22 AC 92 ms
21,224 KB
testcase_23 AC 93 ms
21,288 KB
testcase_24 AC 91 ms
21,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from statistics import median
N = int(input())
Y = list(map(int, input().split()))
P = median(Y)
print(int(sum([abs(y - P) for y in Y])))
0