結果

問題 No.609 Noelちゃんと星々
ユーザー 👑 KazunKazun
提出日時 2020-11-12 04:17:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 107 bytes
コンパイル時間 1,751 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 93,232 KB
最終ジャッジ日時 2023-09-30 01:01:25
合計ジャッジ時間 5,184 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
89,024 KB
testcase_01 AC 92 ms
81,056 KB
testcase_02 AC 88 ms
78,320 KB
testcase_03 AC 91 ms
80,292 KB
testcase_04 AC 82 ms
76,684 KB
testcase_05 AC 114 ms
93,032 KB
testcase_06 AC 107 ms
89,484 KB
testcase_07 AC 95 ms
82,772 KB
testcase_08 AC 80 ms
75,972 KB
testcase_09 AC 90 ms
79,024 KB
testcase_10 AC 99 ms
85,344 KB
testcase_11 AC 98 ms
84,284 KB
testcase_12 AC 106 ms
87,336 KB
testcase_13 AC 82 ms
75,896 KB
testcase_14 AC 77 ms
75,912 KB
testcase_15 AC 111 ms
90,940 KB
testcase_16 AC 114 ms
92,964 KB
testcase_17 AC 106 ms
89,060 KB
testcase_18 AC 85 ms
78,648 KB
testcase_19 AC 108 ms
89,388 KB
testcase_20 AC 116 ms
93,232 KB
testcase_21 AC 115 ms
93,088 KB
testcase_22 AC 115 ms
92,852 KB
testcase_23 AC 117 ms
93,196 KB
testcase_24 AC 117 ms
93,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
Y=sorted(list(map(int,input().split())))
alpha=Y[N//2]
print(sum([abs(alpha-y) for y in Y]))
0