結果

問題 No.609 Noelちゃんと星々
ユーザー _matumo__matumo_
提出日時 2021-01-05 12:44:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 98 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,844 KB
最終ジャッジ日時 2024-04-23 18:51:50
合計ジャッジ時間 3,318 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
18,896 KB
testcase_01 AC 58 ms
14,720 KB
testcase_02 AC 45 ms
13,604 KB
testcase_03 AC 50 ms
14,452 KB
testcase_04 AC 37 ms
12,416 KB
testcase_05 AC 95 ms
20,952 KB
testcase_06 AC 82 ms
19,516 KB
testcase_07 AC 60 ms
16,004 KB
testcase_08 AC 35 ms
11,776 KB
testcase_09 AC 48 ms
13,896 KB
testcase_10 AC 66 ms
17,112 KB
testcase_11 AC 64 ms
16,680 KB
testcase_12 AC 74 ms
18,392 KB
testcase_13 AC 35 ms
12,160 KB
testcase_14 AC 28 ms
11,136 KB
testcase_15 AC 83 ms
19,664 KB
testcase_16 AC 95 ms
21,160 KB
testcase_17 AC 79 ms
19,044 KB
testcase_18 AC 45 ms
13,436 KB
testcase_19 AC 84 ms
19,260 KB
testcase_20 AC 97 ms
21,720 KB
testcase_21 AC 96 ms
21,720 KB
testcase_22 AC 96 ms
21,844 KB
testcase_23 AC 92 ms
21,724 KB
testcase_24 AC 95 ms
21,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
p=sorted(int(s) for s in input().split())
m=p[N//2]
print(sum(abs(a-m) for a in p))
0