結果

問題 No.609 Noelちゃんと星々
ユーザー Mr.FukuMr.Fuku
提出日時 2018-08-04 20:47:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 104 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 11,852 KB
実行使用メモリ 21,160 KB
最終ジャッジ日時 2023-10-19 21:58:05
合計ジャッジ時間 2,988 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
18,356 KB
testcase_01 AC 57 ms
14,192 KB
testcase_02 AC 48 ms
12,744 KB
testcase_03 AC 53 ms
14,164 KB
testcase_04 AC 41 ms
11,860 KB
testcase_05 AC 106 ms
20,444 KB
testcase_06 AC 89 ms
19,116 KB
testcase_07 AC 62 ms
15,348 KB
testcase_08 AC 36 ms
11,220 KB
testcase_09 AC 50 ms
13,564 KB
testcase_10 AC 70 ms
16,788 KB
testcase_11 AC 68 ms
16,120 KB
testcase_12 AC 78 ms
17,948 KB
testcase_13 AC 37 ms
11,452 KB
testcase_14 AC 32 ms
10,732 KB
testcase_15 AC 90 ms
19,128 KB
testcase_16 AC 100 ms
20,648 KB
testcase_17 AC 83 ms
18,376 KB
testcase_18 AC 45 ms
12,836 KB
testcase_19 AC 87 ms
19,116 KB
testcase_20 AC 102 ms
21,160 KB
testcase_21 AC 103 ms
21,160 KB
testcase_22 AC 102 ms
21,160 KB
testcase_23 AC 101 ms
21,160 KB
testcase_24 AC 102 ms
21,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
y=sorted(map(int,input().split()))
print(sum([abs(y[i]-y[-(i+1)]) for i in range(n//2)]))
0