結果

問題 No.1564 Sum of Products of Pairs
ユーザー PSL24251284PSL24251284
提出日時 2021-06-26 16:34:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 108,420 KB
最終ジャッジ日時 2023-09-07 17:03:16
合計ジャッジ時間 5,422 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,412 KB
testcase_01 AC 74 ms
71,292 KB
testcase_02 AC 75 ms
71,056 KB
testcase_03 AC 110 ms
90,376 KB
testcase_04 AC 80 ms
76,092 KB
testcase_05 AC 121 ms
94,824 KB
testcase_06 AC 108 ms
88,800 KB
testcase_07 AC 94 ms
82,960 KB
testcase_08 AC 86 ms
78,300 KB
testcase_09 AC 99 ms
83,960 KB
testcase_10 AC 123 ms
95,116 KB
testcase_11 AC 129 ms
98,460 KB
testcase_12 AC 110 ms
90,276 KB
testcase_13 AC 74 ms
71,412 KB
testcase_14 AC 74 ms
71,372 KB
testcase_15 AC 74 ms
71,284 KB
testcase_16 AC 74 ms
71,488 KB
testcase_17 AC 74 ms
71,192 KB
testcase_18 AC 146 ms
108,116 KB
testcase_19 AC 142 ms
104,628 KB
testcase_20 AC 148 ms
108,316 KB
testcase_21 AC 149 ms
108,032 KB
testcase_22 AC 143 ms
104,416 KB
testcase_23 AC 151 ms
108,420 KB
testcase_24 AC 147 ms
107,812 KB
testcase_25 AC 149 ms
107,980 KB
testcase_26 AC 147 ms
107,964 KB
testcase_27 AC 147 ms
108,208 KB
testcase_28 AC 74 ms
71,276 KB
testcase_29 AC 74 ms
71,252 KB
testcase_30 AC 73 ms
71,400 KB
testcase_31 AC 74 ms
71,368 KB
testcase_32 AC 74 ms
71,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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