結果

問題 No.1564 Sum of Products of Pairs
ユーザー etale.K3etale.K3
提出日時 2021-10-15 22:50:09
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 198 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 11,732 KB
実行使用メモリ 32,876 KB
最終ジャッジ日時 2023-10-17 20:44:05
合計ジャッジ時間 6,210 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,080 KB
testcase_01 AC 29 ms
10,080 KB
testcase_02 AC 28 ms
10,080 KB
testcase_03 AC 96 ms
20,792 KB
testcase_04 AC 35 ms
11,160 KB
testcase_05 AC 129 ms
24,312 KB
testcase_06 AC 95 ms
19,728 KB
testcase_07 AC 69 ms
16,188 KB
testcase_08 AC 48 ms
13,084 KB
testcase_09 AC 71 ms
16,752 KB
testcase_10 AC 131 ms
24,896 KB
testcase_11 AC 145 ms
26,496 KB
testcase_12 AC 101 ms
21,012 KB
testcase_13 AC 29 ms
10,080 KB
testcase_14 AC 29 ms
10,080 KB
testcase_15 AC 30 ms
10,080 KB
testcase_16 AC 29 ms
10,080 KB
testcase_17 AC 29 ms
10,080 KB
testcase_18 AC 189 ms
32,144 KB
testcase_19 AC 182 ms
31,184 KB
testcase_20 AC 191 ms
32,180 KB
testcase_21 AC 196 ms
32,824 KB
testcase_22 AC 178 ms
31,120 KB
testcase_23 AC 193 ms
32,876 KB
testcase_24 AC 197 ms
32,872 KB
testcase_25 AC 198 ms
32,876 KB
testcase_26 AC 196 ms
32,876 KB
testcase_27 AC 198 ms
32,872 KB
testcase_28 AC 29 ms
10,080 KB
testcase_29 AC 29 ms
10,080 KB
testcase_30 AC 29 ms
10,080 KB
testcase_31 AC 29 ms
10,080 KB
testcase_32 AC 29 ms
10,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted(list(map(int,input().split())))

ans = 0
for i in range(N):
    ans += A[2*i] * A[2*i+1]

print(ans)
0