結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
18,276 KB
testcase_01 AC 56 ms
14,044 KB
testcase_02 AC 46 ms
12,928 KB
testcase_03 AC 54 ms
14,632 KB
testcase_04 AC 41 ms
12,044 KB
testcase_05 AC 100 ms
20,364 KB
testcase_06 AC 87 ms
18,900 KB
testcase_07 AC 62 ms
15,256 KB
testcase_08 AC 35 ms
11,140 KB
testcase_09 AC 50 ms
13,748 KB
testcase_10 AC 70 ms
16,344 KB
testcase_11 AC 67 ms
16,040 KB
testcase_12 AC 79 ms
17,604 KB
testcase_13 AC 37 ms
11,464 KB
testcase_14 AC 32 ms
10,648 KB
testcase_15 AC 89 ms
19,048 KB
testcase_16 AC 104 ms
20,568 KB
testcase_17 AC 85 ms
18,296 KB
testcase_18 AC 48 ms
12,888 KB
testcase_19 AC 91 ms
18,908 KB
testcase_20 AC 106 ms
20,768 KB
testcase_21 AC 105 ms
20,768 KB
testcase_22 AC 105 ms
20,768 KB
testcase_23 AC 100 ms
20,768 KB
testcase_24 AC 103 ms
20,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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