結果

問題 No.609 Noelちゃんと星々
ユーザー mlihua09mlihua09
提出日時 2020-09-20 18:10:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 141 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 103,316 KB
最終ジャッジ日時 2023-09-06 16:26:06
合計ジャッジ時間 9,832 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 280 ms
98,488 KB
testcase_01 AC 260 ms
91,496 KB
testcase_02 AC 255 ms
89,320 KB
testcase_03 AC 257 ms
90,724 KB
testcase_04 AC 252 ms
87,792 KB
testcase_05 AC 288 ms
102,748 KB
testcase_06 AC 274 ms
98,916 KB
testcase_07 AC 275 ms
92,820 KB
testcase_08 AC 253 ms
86,380 KB
testcase_09 AC 263 ms
90,284 KB
testcase_10 AC 270 ms
95,360 KB
testcase_11 AC 270 ms
94,036 KB
testcase_12 AC 277 ms
97,388 KB
testcase_13 AC 254 ms
87,172 KB
testcase_14 AC 248 ms
86,380 KB
testcase_15 AC 281 ms
100,720 KB
testcase_16 AC 295 ms
102,992 KB
testcase_17 AC 274 ms
98,692 KB
testcase_18 AC 251 ms
89,652 KB
testcase_19 AC 276 ms
99,144 KB
testcase_20 AC 294 ms
103,316 KB
testcase_21 AC 284 ms
103,184 KB
testcase_22 AC 286 ms
102,972 KB
testcase_23 AC 286 ms
103,048 KB
testcase_24 AC 287 ms
103,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import statistics

n = int(input())

Y = list(map(int, input().split()))

m = statistics.median_low(Y)

print(sum([abs(y - m) for y in Y]))
0