結果

問題 No.1564 Sum of Products of Pairs
ユーザー 👑 rin204rin204
提出日時 2021-08-05 13:21:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 108,392 KB
最終ジャッジ日時 2023-10-14 21:35:32
合計ジャッジ時間 5,576 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,372 KB
testcase_01 AC 70 ms
71,248 KB
testcase_02 AC 69 ms
71,228 KB
testcase_03 AC 176 ms
90,216 KB
testcase_04 AC 80 ms
75,932 KB
testcase_05 AC 118 ms
94,804 KB
testcase_06 AC 103 ms
88,528 KB
testcase_07 AC 92 ms
83,000 KB
testcase_08 AC 80 ms
78,340 KB
testcase_09 AC 91 ms
83,824 KB
testcase_10 AC 118 ms
94,968 KB
testcase_11 AC 122 ms
98,096 KB
testcase_12 AC 105 ms
90,300 KB
testcase_13 AC 69 ms
70,996 KB
testcase_14 AC 70 ms
71,012 KB
testcase_15 AC 70 ms
71,228 KB
testcase_16 AC 68 ms
71,324 KB
testcase_17 AC 69 ms
71,408 KB
testcase_18 AC 142 ms
107,708 KB
testcase_19 AC 139 ms
104,512 KB
testcase_20 AC 143 ms
108,140 KB
testcase_21 AC 144 ms
108,184 KB
testcase_22 AC 135 ms
104,008 KB
testcase_23 AC 142 ms
108,392 KB
testcase_24 AC 144 ms
107,816 KB
testcase_25 AC 145 ms
107,740 KB
testcase_26 AC 144 ms
108,212 KB
testcase_27 AC 146 ms
108,140 KB
testcase_28 AC 73 ms
71,252 KB
testcase_29 AC 69 ms
71,272 KB
testcase_30 AC 70 ms
71,328 KB
testcase_31 AC 71 ms
71,120 KB
testcase_32 AC 70 ms
71,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
alst = list(map(int, input().split()))
alst.sort(reverse = True)
ans = 0
for i in range(0, 2 * n, 2):
    ans += alst[i] * alst[i + 1]
print(ans)
0