結果

問題 No.609 Noelちゃんと星々
ユーザー H3PO4H3PO4
提出日時 2020-10-10 09:10:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 136 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 21,488 KB
最終ジャッジ日時 2023-09-27 21:08:41
合計ジャッジ時間 3,414 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
18,396 KB
testcase_01 AC 46 ms
14,600 KB
testcase_02 AC 43 ms
13,088 KB
testcase_03 AC 45 ms
14,276 KB
testcase_04 AC 35 ms
12,080 KB
testcase_05 AC 79 ms
20,492 KB
testcase_06 AC 70 ms
19,204 KB
testcase_07 AC 52 ms
15,420 KB
testcase_08 AC 31 ms
11,516 KB
testcase_09 AC 43 ms
13,576 KB
testcase_10 AC 58 ms
16,828 KB
testcase_11 AC 57 ms
16,260 KB
testcase_12 AC 69 ms
18,172 KB
testcase_13 AC 37 ms
11,852 KB
testcase_14 AC 32 ms
10,888 KB
testcase_15 AC 78 ms
19,376 KB
testcase_16 AC 86 ms
20,892 KB
testcase_17 AC 69 ms
18,460 KB
testcase_18 AC 40 ms
13,244 KB
testcase_19 AC 73 ms
19,192 KB
testcase_20 AC 82 ms
21,436 KB
testcase_21 AC 81 ms
21,224 KB
testcase_22 AC 84 ms
21,488 KB
testcase_23 AC 82 ms
21,308 KB
testcase_24 AC 84 ms
21,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import statistics

N = int(input())
Y = tuple(map(int, input().split()))
M = statistics.median_low(Y)
print(sum(abs(y - M) for y in Y))
0