結果

問題 No.1564 Sum of Products of Pairs
ユーザー nasubi24nasubi24
提出日時 2021-06-26 13:23:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 120 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 108,624 KB
最終ジャッジ日時 2023-09-07 16:28:31
合計ジャッジ時間 5,153 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,276 KB
testcase_01 AC 71 ms
71,452 KB
testcase_02 AC 70 ms
71,332 KB
testcase_03 AC 105 ms
90,864 KB
testcase_04 AC 76 ms
76,232 KB
testcase_05 AC 119 ms
95,284 KB
testcase_06 AC 108 ms
88,716 KB
testcase_07 AC 94 ms
82,900 KB
testcase_08 AC 82 ms
78,392 KB
testcase_09 AC 94 ms
84,052 KB
testcase_10 AC 117 ms
95,268 KB
testcase_11 AC 124 ms
98,456 KB
testcase_12 AC 107 ms
90,404 KB
testcase_13 AC 72 ms
71,556 KB
testcase_14 AC 72 ms
71,356 KB
testcase_15 AC 70 ms
71,356 KB
testcase_16 AC 72 ms
71,348 KB
testcase_17 AC 71 ms
71,360 KB
testcase_18 AC 142 ms
107,984 KB
testcase_19 AC 137 ms
104,808 KB
testcase_20 AC 143 ms
108,348 KB
testcase_21 AC 144 ms
108,180 KB
testcase_22 AC 136 ms
104,312 KB
testcase_23 AC 144 ms
108,624 KB
testcase_24 AC 143 ms
108,292 KB
testcase_25 AC 143 ms
108,160 KB
testcase_26 AC 143 ms
108,264 KB
testcase_27 AC 154 ms
108,452 KB
testcase_28 AC 73 ms
71,484 KB
testcase_29 AC 72 ms
71,396 KB
testcase_30 AC 71 ms
71,196 KB
testcase_31 AC 70 ms
71,164 KB
testcase_32 AC 69 ms
71,588 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