結果

問題 No.609 Noelちゃんと星々
ユーザー MaboyMaboy
提出日時 2018-03-06 23:06:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 11,752 KB
実行使用メモリ 20,676 KB
最終ジャッジ日時 2023-10-21 23:51:48
合計ジャッジ時間 3,379 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
18,180 KB
testcase_01 AC 53 ms
13,952 KB
testcase_02 AC 49 ms
12,836 KB
testcase_03 AC 51 ms
14,540 KB
testcase_04 AC 39 ms
11,948 KB
testcase_05 AC 96 ms
20,272 KB
testcase_06 AC 84 ms
18,808 KB
testcase_07 AC 61 ms
15,164 KB
testcase_08 AC 34 ms
11,048 KB
testcase_09 AC 49 ms
13,652 KB
testcase_10 AC 69 ms
16,252 KB
testcase_11 AC 66 ms
15,944 KB
testcase_12 AC 76 ms
17,512 KB
testcase_13 AC 37 ms
11,284 KB
testcase_14 AC 31 ms
10,536 KB
testcase_15 AC 88 ms
18,956 KB
testcase_16 AC 97 ms
20,476 KB
testcase_17 AC 82 ms
18,204 KB
testcase_18 AC 45 ms
12,796 KB
testcase_19 AC 86 ms
18,812 KB
testcase_20 AC 101 ms
20,676 KB
testcase_21 AC 101 ms
20,676 KB
testcase_22 AC 101 ms
20,676 KB
testcase_23 AC 101 ms
20,676 KB
testcase_24 AC 101 ms
20,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
n=int(I())
y=sorted(map(int,I().split()))
m=(y[len(y)//2]+list(reversed(y))[n//2])//2
print(sum([abs(m-x) for x in y]))
0