結果

問題 No.1564 Sum of Products of Pairs
ユーザー kazuki26kazuki26
提出日時 2021-07-11 18:37:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 31,052 KB
最終ジャッジ日時 2023-09-14 20:17:37
合計ジャッジ時間 4,603 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,824 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 16 ms
7,824 KB
testcase_03 AC 78 ms
18,932 KB
testcase_04 AC 21 ms
9,288 KB
testcase_05 AC 104 ms
22,448 KB
testcase_06 AC 76 ms
17,916 KB
testcase_07 AC 52 ms
14,368 KB
testcase_08 AC 33 ms
11,216 KB
testcase_09 AC 57 ms
14,792 KB
testcase_10 AC 106 ms
22,972 KB
testcase_11 AC 126 ms
24,576 KB
testcase_12 AC 82 ms
19,156 KB
testcase_13 AC 15 ms
7,824 KB
testcase_14 AC 15 ms
7,968 KB
testcase_15 AC 16 ms
7,940 KB
testcase_16 AC 15 ms
7,856 KB
testcase_17 AC 16 ms
7,868 KB
testcase_18 AC 170 ms
30,188 KB
testcase_19 AC 159 ms
29,320 KB
testcase_20 AC 167 ms
30,212 KB
testcase_21 AC 170 ms
30,964 KB
testcase_22 AC 154 ms
29,260 KB
testcase_23 AC 172 ms
31,020 KB
testcase_24 AC 174 ms
31,012 KB
testcase_25 AC 171 ms
31,052 KB
testcase_26 AC 175 ms
30,948 KB
testcase_27 AC 176 ms
30,928 KB
testcase_28 AC 16 ms
7,908 KB
testcase_29 AC 15 ms
7,776 KB
testcase_30 AC 16 ms
7,852 KB
testcase_31 AC 15 ms
7,852 KB
testcase_32 AC 15 ms
7,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

array = [int(x) for x in input().split()]
array = sorted(array, reverse=True)

sum = 0
for i in range(n):
	sum += array[2*i] * array[i*2+1]
print(sum)
0