結果
| 問題 |
No.1564 Sum of Products of Pairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-05 13:21:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 116 ms / 2,000 ms |
| コード長 | 163 bytes |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 104,064 KB |
| 最終ジャッジ日時 | 2024-09-16 15:19:48 |
| 合計ジャッジ時間 | 3,815 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)