結果
| 問題 | No.1564 Sum of Products of Pairs |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-05 13:21:40 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 2,000 ms |
| コード長 | 163 bytes |
| 記録 | |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 103,936 KB |
| 最終ジャッジ日時 | 2026-04-05 20:09:18 |
| 合計ジャッジ時間 | 2,877 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
n = int(input())
alst = list(map(int, input().split()))
alst.sort(reverse = True)
ans = 0
for i in range(0, 2 * n, 2):
ans += alst[i] * alst[i + 1]
print(ans)