結果
| 問題 | No.1564 Sum of Products of Pairs | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-29 16:26:41 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 117 ms / 2,000 ms | 
| コード長 | 137 bytes | 
| コンパイル時間 | 311 ms | 
| コンパイル使用メモリ | 82,332 KB | 
| 実行使用メモリ | 106,684 KB | 
| 最終ジャッジ日時 | 2025-01-02 08:03:08 | 
| 合計ジャッジ時間 | 4,309 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
n = int(input()) a = list(map(int, input().split())) a.sort(reverse=True) ans = sum(a[2 * i] * a[2 * i + 1] for i in range(n)) print(ans)
