結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
18,304 KB
testcase_01 AC 55 ms
14,072 KB
testcase_02 AC 47 ms
12,956 KB
testcase_03 AC 54 ms
14,660 KB
testcase_04 AC 40 ms
12,072 KB
testcase_05 AC 95 ms
20,392 KB
testcase_06 AC 88 ms
18,928 KB
testcase_07 AC 63 ms
15,284 KB
testcase_08 AC 35 ms
11,168 KB
testcase_09 AC 50 ms
13,776 KB
testcase_10 AC 72 ms
16,372 KB
testcase_11 AC 68 ms
16,068 KB
testcase_12 AC 77 ms
17,632 KB
testcase_13 AC 38 ms
11,492 KB
testcase_14 AC 33 ms
10,676 KB
testcase_15 AC 88 ms
19,076 KB
testcase_16 AC 99 ms
20,596 KB
testcase_17 AC 81 ms
18,324 KB
testcase_18 AC 45 ms
12,916 KB
testcase_19 AC 87 ms
18,936 KB
testcase_20 AC 103 ms
20,796 KB
testcase_21 AC 101 ms
20,796 KB
testcase_22 AC 99 ms
20,796 KB
testcase_23 AC 99 ms
20,796 KB
testcase_24 AC 99 ms
20,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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