結果

問題 No.1564 Sum of Products of Pairs
ユーザー SidewaysOwl
提出日時 2021-10-29 08:08:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 103,552 KB
最終ジャッジ日時 2024-10-07 08:29:45
合計ジャッジ時間 4,160 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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