結果

問題 No.1564 Sum of Products of Pairs
ユーザー brthyyjpbrthyyjp
提出日時 2021-07-11 16:25:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 124 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 108,468 KB
最終ジャッジ日時 2023-09-14 20:13:03
合計ジャッジ時間 6,602 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,324 KB
testcase_01 AC 69 ms
71,268 KB
testcase_02 AC 71 ms
71,000 KB
testcase_03 AC 104 ms
90,496 KB
testcase_04 AC 78 ms
76,280 KB
testcase_05 AC 118 ms
94,808 KB
testcase_06 AC 102 ms
88,516 KB
testcase_07 AC 89 ms
83,016 KB
testcase_08 AC 82 ms
78,176 KB
testcase_09 AC 92 ms
84,000 KB
testcase_10 AC 118 ms
94,960 KB
testcase_11 AC 123 ms
98,164 KB
testcase_12 AC 106 ms
90,556 KB
testcase_13 AC 69 ms
71,192 KB
testcase_14 AC 71 ms
71,296 KB
testcase_15 AC 70 ms
71,140 KB
testcase_16 AC 70 ms
71,428 KB
testcase_17 AC 72 ms
71,156 KB
testcase_18 AC 142 ms
107,828 KB
testcase_19 AC 135 ms
104,396 KB
testcase_20 AC 141 ms
107,936 KB
testcase_21 AC 142 ms
108,016 KB
testcase_22 AC 136 ms
104,136 KB
testcase_23 AC 145 ms
108,468 KB
testcase_24 AC 143 ms
107,796 KB
testcase_25 AC 144 ms
107,836 KB
testcase_26 AC 143 ms
107,972 KB
testcase_27 AC 145 ms
108,448 KB
testcase_28 AC 69 ms
71,472 KB
testcase_29 AC 69 ms
71,476 KB
testcase_30 AC 69 ms
71,264 KB
testcase_31 AC 68 ms
71,456 KB
testcase_32 AC 68 ms
71,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(n):
  ans += A[2*i]*A[2*i+1]
print(ans)
0