結果

問題 No.1564 Sum of Products of Pairs
ユーザー ThetaTheta
提出日時 2022-12-19 19:29:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 30,676 KB
最終ジャッジ日時 2024-04-29 02:23:14
合計ジャッジ時間 4,955 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 29 ms
10,496 KB
testcase_02 AC 29 ms
10,624 KB
testcase_03 AC 88 ms
19,916 KB
testcase_04 AC 35 ms
11,520 KB
testcase_05 AC 114 ms
23,164 KB
testcase_06 AC 85 ms
18,936 KB
testcase_07 AC 62 ms
15,852 KB
testcase_08 AC 46 ms
13,312 KB
testcase_09 AC 65 ms
16,340 KB
testcase_10 AC 110 ms
23,428 KB
testcase_11 AC 120 ms
24,788 KB
testcase_12 AC 89 ms
20,212 KB
testcase_13 AC 30 ms
10,496 KB
testcase_14 AC 29 ms
10,496 KB
testcase_15 AC 30 ms
10,496 KB
testcase_16 AC 30 ms
10,496 KB
testcase_17 AC 31 ms
10,496 KB
testcase_18 AC 158 ms
29,808 KB
testcase_19 AC 148 ms
28,916 KB
testcase_20 AC 157 ms
29,836 KB
testcase_21 AC 166 ms
30,392 KB
testcase_22 AC 149 ms
28,968 KB
testcase_23 AC 164 ms
30,528 KB
testcase_24 AC 168 ms
30,544 KB
testcase_25 AC 163 ms
30,540 KB
testcase_26 AC 160 ms
30,416 KB
testcase_27 AC 159 ms
30,676 KB
testcase_28 AC 30 ms
10,368 KB
testcase_29 AC 30 ms
10,624 KB
testcase_30 AC 30 ms
10,624 KB
testcase_31 AC 30 ms
10,624 KB
testcase_32 AC 30 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    print(sum(elm1*elm2 for elm1, elm2 in zip(A[::2], A[1::2])))


if __name__ == "__main__":
    main()
0