結果

問題 No.1564 Sum of Products of Pairs
ユーザー googol_S0googol_S0
提出日時 2021-06-26 13:03:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 118 bytes
コンパイル時間 1,144 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 110,116 KB
最終ジャッジ日時 2023-09-07 16:14:28
合計ジャッジ時間 6,078 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,176 KB
testcase_01 AC 72 ms
71,440 KB
testcase_02 AC 69 ms
71,172 KB
testcase_03 AC 106 ms
91,260 KB
testcase_04 AC 76 ms
76,412 KB
testcase_05 AC 120 ms
95,968 KB
testcase_06 AC 105 ms
89,296 KB
testcase_07 AC 94 ms
83,216 KB
testcase_08 AC 83 ms
78,732 KB
testcase_09 AC 95 ms
84,532 KB
testcase_10 AC 119 ms
96,064 KB
testcase_11 AC 126 ms
99,308 KB
testcase_12 AC 108 ms
91,392 KB
testcase_13 AC 70 ms
71,468 KB
testcase_14 AC 71 ms
71,112 KB
testcase_15 AC 72 ms
71,252 KB
testcase_16 AC 71 ms
71,252 KB
testcase_17 AC 70 ms
71,376 KB
testcase_18 AC 145 ms
109,388 KB
testcase_19 AC 142 ms
106,344 KB
testcase_20 AC 145 ms
109,500 KB
testcase_21 AC 148 ms
109,624 KB
testcase_22 AC 142 ms
105,728 KB
testcase_23 AC 148 ms
110,116 KB
testcase_24 AC 148 ms
109,644 KB
testcase_25 AC 149 ms
109,528 KB
testcase_26 AC 149 ms
109,984 KB
testcase_27 AC 150 ms
110,096 KB
testcase_28 AC 73 ms
71,260 KB
testcase_29 AC 72 ms
71,112 KB
testcase_30 AC 71 ms
71,304 KB
testcase_31 AC 71 ms
71,376 KB
testcase_32 AC 72 ms
71,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
A=sorted(A)
ANS=0
for i in range(N):
  ANS+=A[i*2]*A[i*2+1]
print(ANS)
0