結果

問題 No.1564 Sum of Products of Pairs
ユーザー 👑 KazunKazun
提出日時 2021-06-27 21:44:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 110,200 KB
最終ジャッジ日時 2023-09-07 18:08:51
合計ジャッジ時間 5,218 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,216 KB
testcase_01 AC 72 ms
71,476 KB
testcase_02 AC 72 ms
71,416 KB
testcase_03 AC 107 ms
91,168 KB
testcase_04 AC 78 ms
76,044 KB
testcase_05 AC 119 ms
95,908 KB
testcase_06 AC 106 ms
89,268 KB
testcase_07 AC 94 ms
83,588 KB
testcase_08 AC 84 ms
78,432 KB
testcase_09 AC 96 ms
84,640 KB
testcase_10 AC 120 ms
96,072 KB
testcase_11 AC 127 ms
99,340 KB
testcase_12 AC 108 ms
91,236 KB
testcase_13 AC 72 ms
71,304 KB
testcase_14 AC 71 ms
71,216 KB
testcase_15 AC 71 ms
71,188 KB
testcase_16 AC 72 ms
71,476 KB
testcase_17 AC 72 ms
71,608 KB
testcase_18 AC 145 ms
109,596 KB
testcase_19 AC 142 ms
106,040 KB
testcase_20 AC 147 ms
109,740 KB
testcase_21 AC 149 ms
109,752 KB
testcase_22 AC 142 ms
105,900 KB
testcase_23 AC 151 ms
109,932 KB
testcase_24 AC 148 ms
109,568 KB
testcase_25 AC 146 ms
109,672 KB
testcase_26 AC 148 ms
109,856 KB
testcase_27 AC 147 ms
110,200 KB
testcase_28 AC 72 ms
71,484 KB
testcase_29 AC 71 ms
71,548 KB
testcase_30 AC 71 ms
71,400 KB
testcase_31 AC 74 ms
71,216 KB
testcase_32 AC 71 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

X=0
for k in range(N):
    X+=B[2*k]*B[2*k+1]

print(X)
0