結果

問題 No.609 Noelちゃんと星々
ユーザー BQZetBQZet
提出日時 2017-12-20 23:23:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,996 KB
最終ジャッジ日時 2024-05-09 16:46:01
合計ジャッジ時間 4,058 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
19,172 KB
testcase_01 AC 60 ms
15,072 KB
testcase_02 AC 46 ms
13,748 KB
testcase_03 AC 52 ms
14,728 KB
testcase_04 AC 39 ms
12,748 KB
testcase_05 AC 99 ms
21,104 KB
testcase_06 AC 86 ms
19,836 KB
testcase_07 AC 63 ms
16,152 KB
testcase_08 AC 32 ms
11,904 KB
testcase_09 AC 45 ms
14,168 KB
testcase_10 AC 68 ms
17,512 KB
testcase_11 AC 67 ms
16,832 KB
testcase_12 AC 79 ms
18,788 KB
testcase_13 AC 37 ms
12,412 KB
testcase_14 AC 31 ms
11,392 KB
testcase_15 AC 90 ms
19,936 KB
testcase_16 AC 100 ms
21,436 KB
testcase_17 AC 84 ms
19,184 KB
testcase_18 AC 45 ms
13,628 KB
testcase_19 AC 91 ms
19,844 KB
testcase_20 AC 104 ms
21,996 KB
testcase_21 AC 99 ms
21,996 KB
testcase_22 AC 100 ms
21,868 KB
testcase_23 AC 102 ms
21,992 KB
testcase_24 AC 101 ms
21,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N=int(input())
Y=list(map(int,input().split()))
Y.sort()

x=0
for i in range(math.floor(N/2)):
	x=x+Y[N-i-1]-Y[i]

print(x)
0