結果

問題 No.1564 Sum of Products of Pairs
ユーザー lam6er
提出日時 2025-03-20 21:02:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 81,892 KB
実行使用メモリ 105,316 KB
最終ジャッジ日時 2025-03-20 21:02:17
合計ジャッジ時間 3,995 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

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