結果

問題 No.1564 Sum of Products of Pairs
ユーザー dangodango
提出日時 2023-06-25 21:32:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 108,636 KB
最終ジャッジ日時 2023-09-15 11:37:17
合計ジャッジ時間 5,436 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,360 KB
testcase_01 AC 70 ms
71,356 KB
testcase_02 AC 74 ms
71,396 KB
testcase_03 AC 108 ms
90,532 KB
testcase_04 AC 78 ms
76,232 KB
testcase_05 AC 119 ms
94,968 KB
testcase_06 AC 105 ms
88,860 KB
testcase_07 AC 92 ms
82,956 KB
testcase_08 AC 85 ms
78,484 KB
testcase_09 AC 95 ms
84,272 KB
testcase_10 AC 119 ms
95,100 KB
testcase_11 AC 126 ms
98,404 KB
testcase_12 AC 108 ms
90,500 KB
testcase_13 AC 73 ms
71,284 KB
testcase_14 AC 72 ms
71,400 KB
testcase_15 AC 72 ms
71,420 KB
testcase_16 AC 71 ms
71,288 KB
testcase_17 AC 73 ms
71,540 KB
testcase_18 AC 147 ms
107,812 KB
testcase_19 AC 144 ms
104,704 KB
testcase_20 AC 147 ms
108,168 KB
testcase_21 AC 148 ms
108,496 KB
testcase_22 AC 143 ms
104,288 KB
testcase_23 AC 149 ms
108,636 KB
testcase_24 AC 145 ms
108,096 KB
testcase_25 AC 145 ms
107,976 KB
testcase_26 AC 146 ms
108,012 KB
testcase_27 AC 145 ms
108,636 KB
testcase_28 AC 71 ms
71,592 KB
testcase_29 AC 71 ms
71,576 KB
testcase_30 AC 72 ms
71,376 KB
testcase_31 AC 73 ms
71,128 KB
testcase_32 AC 73 ms
71,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = sorted(map(int, input().split()), reverse=True)
a = 0
for i in range(n):
    a += l[i * 2] * l[i * 2 + 1]
print(a)
0