結果

問題 No.609 Noelちゃんと星々
ユーザー trineutrontrineutron
提出日時 2020-06-12 21:53:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 122 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 18,948 KB
最終ジャッジ日時 2023-09-06 10:18:13
合計ジャッジ時間 4,606 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
16,444 KB
testcase_01 AC 44 ms
12,508 KB
testcase_02 AC 32 ms
10,920 KB
testcase_03 AC 39 ms
11,984 KB
testcase_04 AC 25 ms
9,800 KB
testcase_05 AC 86 ms
18,504 KB
testcase_06 AC 78 ms
16,960 KB
testcase_07 AC 51 ms
13,352 KB
testcase_08 AC 20 ms
9,164 KB
testcase_09 AC 37 ms
11,380 KB
testcase_10 AC 59 ms
14,416 KB
testcase_11 AC 56 ms
14,196 KB
testcase_12 AC 69 ms
15,732 KB
testcase_13 AC 24 ms
9,480 KB
testcase_14 AC 18 ms
8,636 KB
testcase_15 AC 79 ms
17,200 KB
testcase_16 AC 96 ms
18,584 KB
testcase_17 AC 77 ms
16,436 KB
testcase_18 AC 32 ms
10,956 KB
testcase_19 AC 76 ms
16,912 KB
testcase_20 AC 90 ms
18,784 KB
testcase_21 AC 91 ms
18,780 KB
testcase_22 AC 87 ms
18,948 KB
testcase_23 AC 90 ms
18,760 KB
testcase_24 AC 91 ms
18,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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