結果
| 問題 |
No.1564 Sum of Products of Pairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-28 02:31:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 123 ms / 2,000 ms |
| コード長 | 126 bytes |
| コンパイル時間 | 289 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 105,728 KB |
| 最終ジャッジ日時 | 2024-11-22 15:36:10 |
| 合計ジャッジ時間 | 4,952 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
n = int(input()) a = list(map(int, input().split())) a.sort() ans = sum(a[2 * i] * a[2 * i + 1] for i in range(n)) print(ans)