結果

問題 No.609 Noelちゃんと星々
ユーザー BQZetBQZet
提出日時 2017-12-20 23:23:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 19,072 KB
最終ジャッジ日時 2023-08-22 11:05:41
合計ジャッジ時間 3,534 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
16,544 KB
testcase_01 AC 43 ms
12,236 KB
testcase_02 AC 33 ms
10,856 KB
testcase_03 AC 40 ms
12,108 KB
testcase_04 AC 27 ms
9,952 KB
testcase_05 AC 87 ms
18,532 KB
testcase_06 AC 75 ms
17,164 KB
testcase_07 AC 50 ms
13,376 KB
testcase_08 AC 22 ms
9,440 KB
testcase_09 AC 37 ms
11,496 KB
testcase_10 AC 57 ms
14,476 KB
testcase_11 AC 55 ms
14,348 KB
testcase_12 AC 66 ms
15,908 KB
testcase_13 AC 23 ms
9,612 KB
testcase_14 AC 19 ms
8,752 KB
testcase_15 AC 75 ms
17,312 KB
testcase_16 AC 87 ms
18,744 KB
testcase_17 AC 69 ms
16,480 KB
testcase_18 AC 34 ms
10,932 KB
testcase_19 AC 75 ms
17,076 KB
testcase_20 AC 88 ms
19,036 KB
testcase_21 AC 89 ms
18,932 KB
testcase_22 AC 88 ms
19,056 KB
testcase_23 AC 90 ms
19,072 KB
testcase_24 AC 89 ms
18,936 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