結果

問題 No.1564 Sum of Products of Pairs
ユーザー 👑 H20H20
提出日時 2021-06-27 16:07:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 126 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 108,476 KB
最終ジャッジ日時 2023-09-07 18:01:17
合計ジャッジ時間 5,465 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,288 KB
testcase_01 AC 75 ms
71,064 KB
testcase_02 AC 74 ms
71,440 KB
testcase_03 AC 107 ms
90,420 KB
testcase_04 AC 78 ms
76,032 KB
testcase_05 AC 121 ms
94,924 KB
testcase_06 AC 106 ms
88,572 KB
testcase_07 AC 93 ms
82,808 KB
testcase_08 AC 86 ms
78,204 KB
testcase_09 AC 97 ms
83,940 KB
testcase_10 AC 120 ms
95,152 KB
testcase_11 AC 125 ms
98,380 KB
testcase_12 AC 109 ms
90,520 KB
testcase_13 AC 73 ms
71,072 KB
testcase_14 AC 72 ms
71,240 KB
testcase_15 AC 73 ms
71,056 KB
testcase_16 AC 73 ms
71,260 KB
testcase_17 AC 74 ms
71,292 KB
testcase_18 AC 146 ms
107,872 KB
testcase_19 AC 141 ms
104,732 KB
testcase_20 AC 144 ms
107,940 KB
testcase_21 AC 147 ms
107,884 KB
testcase_22 AC 141 ms
104,248 KB
testcase_23 AC 149 ms
108,476 KB
testcase_24 AC 151 ms
107,864 KB
testcase_25 AC 148 ms
107,896 KB
testcase_26 AC 148 ms
107,964 KB
testcase_27 AC 148 ms
108,212 KB
testcase_28 AC 74 ms
71,060 KB
testcase_29 AC 73 ms
71,292 KB
testcase_30 AC 73 ms
71,288 KB
testcase_31 AC 74 ms
71,056 KB
testcase_32 AC 73 ms
71,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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