結果

問題 No.1564 Sum of Products of Pairs
ユーザー DrDrpilotDrDrpilot
提出日時 2022-01-24 14:30:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 31,020 KB
最終ジャッジ日時 2023-08-21 02:10:57
合計ジャッジ時間 5,996 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,888 KB
testcase_01 AC 16 ms
7,752 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 81 ms
18,864 KB
testcase_04 AC 21 ms
9,100 KB
testcase_05 AC 101 ms
22,240 KB
testcase_06 AC 77 ms
17,708 KB
testcase_07 AC 53 ms
14,336 KB
testcase_08 AC 32 ms
11,228 KB
testcase_09 AC 54 ms
14,744 KB
testcase_10 AC 103 ms
22,976 KB
testcase_11 AC 118 ms
24,520 KB
testcase_12 AC 80 ms
18,980 KB
testcase_13 AC 15 ms
7,784 KB
testcase_14 AC 15 ms
7,740 KB
testcase_15 AC 15 ms
7,780 KB
testcase_16 AC 16 ms
7,796 KB
testcase_17 AC 16 ms
7,752 KB
testcase_18 AC 159 ms
30,080 KB
testcase_19 AC 149 ms
29,200 KB
testcase_20 AC 158 ms
30,144 KB
testcase_21 AC 168 ms
30,816 KB
testcase_22 AC 150 ms
29,092 KB
testcase_23 AC 160 ms
30,848 KB
testcase_24 AC 157 ms
31,020 KB
testcase_25 AC 160 ms
31,020 KB
testcase_26 AC 162 ms
30,996 KB
testcase_27 AC 168 ms
30,968 KB
testcase_28 AC 15 ms
7,784 KB
testcase_29 AC 15 ms
7,784 KB
testcase_30 AC 14 ms
7,836 KB
testcase_31 AC 14 ms
7,784 KB
testcase_32 AC 15 ms
7,796 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