結果

問題 No.609 Noelちゃんと星々
ユーザー konabekonabe
提出日時 2017-12-09 00:53:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 24,688 KB
最終ジャッジ日時 2024-05-07 06:50:02
合計ジャッジ時間 3,817 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
22,024 KB
testcase_01 AC 72 ms
18,100 KB
testcase_02 AC 60 ms
16,532 KB
testcase_03 AC 66 ms
18,028 KB
testcase_04 AC 55 ms
15,600 KB
testcase_05 AC 105 ms
23,944 KB
testcase_06 AC 97 ms
22,508 KB
testcase_07 AC 74 ms
18,900 KB
testcase_08 AC 50 ms
14,464 KB
testcase_09 AC 63 ms
16,836 KB
testcase_10 AC 86 ms
20,104 KB
testcase_11 AC 80 ms
19,556 KB
testcase_12 AC 89 ms
21,220 KB
testcase_13 AC 52 ms
15,232 KB
testcase_14 AC 49 ms
14,208 KB
testcase_15 AC 103 ms
22,908 KB
testcase_16 AC 115 ms
24,408 KB
testcase_17 AC 99 ms
21,908 KB
testcase_18 AC 60 ms
16,496 KB
testcase_19 AC 97 ms
22,380 KB
testcase_20 AC 115 ms
24,488 KB
testcase_21 AC 114 ms
24,612 KB
testcase_22 AC 115 ms
24,688 KB
testcase_23 AC 121 ms
24,616 KB
testcase_24 AC 113 ms
24,488 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