結果

問題 No.609 Noelちゃんと星々
ユーザー konabekonabe
提出日時 2017-12-09 00:53:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 21,396 KB
最終ジャッジ日時 2023-08-19 23:37:57
合計ジャッジ時間 3,986 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
18,420 KB
testcase_01 AC 53 ms
14,964 KB
testcase_02 AC 47 ms
13,656 KB
testcase_03 AC 51 ms
14,728 KB
testcase_04 AC 41 ms
12,544 KB
testcase_05 AC 89 ms
20,740 KB
testcase_06 AC 80 ms
19,224 KB
testcase_07 AC 59 ms
15,564 KB
testcase_08 AC 36 ms
11,476 KB
testcase_09 AC 50 ms
13,736 KB
testcase_10 AC 66 ms
17,128 KB
testcase_11 AC 65 ms
16,308 KB
testcase_12 AC 73 ms
18,040 KB
testcase_13 AC 37 ms
11,860 KB
testcase_14 AC 34 ms
10,988 KB
testcase_15 AC 82 ms
19,288 KB
testcase_16 AC 92 ms
20,816 KB
testcase_17 AC 78 ms
18,484 KB
testcase_18 AC 46 ms
13,744 KB
testcase_19 AC 81 ms
19,420 KB
testcase_20 AC 97 ms
21,396 KB
testcase_21 AC 91 ms
21,316 KB
testcase_22 AC 91 ms
21,396 KB
testcase_23 AC 95 ms
21,168 KB
testcase_24 AC 94 ms
21,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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