結果

問題 No.1564 Sum of Products of Pairs
ユーザー pluto77pluto77
提出日時 2021-07-16 15:11:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 31,012 KB
最終ジャッジ日時 2023-09-20 03:47:29
合計ジャッジ時間 5,825 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 87 ms
18,816 KB
testcase_04 AC 22 ms
9,184 KB
testcase_05 AC 113 ms
22,268 KB
testcase_06 AC 81 ms
17,728 KB
testcase_07 AC 54 ms
14,320 KB
testcase_08 AC 34 ms
11,220 KB
testcase_09 AC 59 ms
14,896 KB
testcase_10 AC 120 ms
22,896 KB
testcase_11 AC 132 ms
24,484 KB
testcase_12 AC 89 ms
19,000 KB
testcase_13 AC 15 ms
7,876 KB
testcase_14 AC 15 ms
7,740 KB
testcase_15 AC 16 ms
7,884 KB
testcase_16 AC 16 ms
7,944 KB
testcase_17 AC 16 ms
7,876 KB
testcase_18 AC 181 ms
30,128 KB
testcase_19 AC 169 ms
29,360 KB
testcase_20 AC 185 ms
30,180 KB
testcase_21 AC 189 ms
30,812 KB
testcase_22 AC 171 ms
29,248 KB
testcase_23 AC 185 ms
30,848 KB
testcase_24 AC 184 ms
31,012 KB
testcase_25 AC 184 ms
30,900 KB
testcase_26 AC 185 ms
30,976 KB
testcase_27 AC 183 ms
30,984 KB
testcase_28 AC 15 ms
7,804 KB
testcase_29 AC 16 ms
7,800 KB
testcase_30 AC 16 ms
7,772 KB
testcase_31 AC 16 ms
7,936 KB
testcase_32 AC 15 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1564
n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
res=0
for i in range(n):
 res+=b[2*i]*b[2*i+1]
print(res)
0