結果

問題 No.1564 Sum of Products of Pairs
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-08-25 09:07:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 129 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 105,012 KB
最終ジャッジ日時 2024-04-27 19:52:33
合計ジャッジ時間 3,827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
53,344 KB
testcase_01 AC 30 ms
52,896 KB
testcase_02 AC 34 ms
52,772 KB
testcase_03 AC 67 ms
81,376 KB
testcase_04 AC 37 ms
60,896 KB
testcase_05 AC 73 ms
87,396 KB
testcase_06 AC 65 ms
78,728 KB
testcase_07 AC 52 ms
71,920 KB
testcase_08 AC 45 ms
65,172 KB
testcase_09 AC 56 ms
72,480 KB
testcase_10 AC 76 ms
87,248 KB
testcase_11 AC 83 ms
91,208 KB
testcase_12 AC 69 ms
81,780 KB
testcase_13 AC 36 ms
52,856 KB
testcase_14 AC 36 ms
52,560 KB
testcase_15 AC 32 ms
52,184 KB
testcase_16 AC 31 ms
52,788 KB
testcase_17 AC 32 ms
52,340 KB
testcase_18 AC 100 ms
103,852 KB
testcase_19 AC 94 ms
99,208 KB
testcase_20 AC 99 ms
104,556 KB
testcase_21 AC 103 ms
104,088 KB
testcase_22 AC 94 ms
99,412 KB
testcase_23 AC 101 ms
105,012 KB
testcase_24 AC 109 ms
104,248 KB
testcase_25 AC 103 ms
103,832 KB
testcase_26 AC 100 ms
104,188 KB
testcase_27 AC 99 ms
103,624 KB
testcase_28 AC 32 ms
52,388 KB
testcase_29 AC 32 ms
52,624 KB
testcase_30 AC 30 ms
51,828 KB
testcase_31 AC 30 ms
52,080 KB
testcase_32 AC 29 ms
52,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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