結果

問題 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  
実行時間 132 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 872 ms
コンパイル使用メモリ 10,488 KB
実行使用メモリ 30,948 KB
最終ジャッジ日時 2023-08-11 09:54:07
合計ジャッジ時間 6,650 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,784 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 14 ms
7,704 KB
testcase_03 AC 65 ms
18,936 KB
testcase_04 AC 20 ms
9,268 KB
testcase_05 AC 84 ms
22,288 KB
testcase_06 AC 62 ms
17,804 KB
testcase_07 AC 43 ms
14,184 KB
testcase_08 AC 29 ms
11,156 KB
testcase_09 AC 47 ms
14,760 KB
testcase_10 AC 87 ms
22,960 KB
testcase_11 AC 93 ms
24,524 KB
testcase_12 AC 69 ms
19,012 KB
testcase_13 AC 15 ms
7,708 KB
testcase_14 AC 15 ms
7,844 KB
testcase_15 AC 15 ms
7,752 KB
testcase_16 AC 15 ms
7,920 KB
testcase_17 AC 15 ms
7,908 KB
testcase_18 AC 129 ms
30,152 KB
testcase_19 AC 123 ms
29,256 KB
testcase_20 AC 128 ms
30,240 KB
testcase_21 AC 132 ms
30,828 KB
testcase_22 AC 124 ms
29,140 KB
testcase_23 AC 131 ms
30,948 KB
testcase_24 AC 131 ms
30,940 KB
testcase_25 AC 132 ms
30,876 KB
testcase_26 AC 130 ms
30,844 KB
testcase_27 AC 130 ms
30,840 KB
testcase_28 AC 15 ms
7,752 KB
testcase_29 AC 14 ms
7,772 KB
testcase_30 AC 15 ms
7,704 KB
testcase_31 AC 14 ms
7,752 KB
testcase_32 AC 14 ms
7,708 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