結果

問題 No.1564 Sum of Products of Pairs
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-06-26 13:09:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 760 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 107,372 KB
最終ジャッジ日時 2023-09-07 16:20:25
合計ジャッジ時間 5,655 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,536 KB
testcase_01 AC 70 ms
71,616 KB
testcase_02 AC 69 ms
71,252 KB
testcase_03 AC 104 ms
89,936 KB
testcase_04 AC 76 ms
76,264 KB
testcase_05 AC 116 ms
94,436 KB
testcase_06 AC 101 ms
88,336 KB
testcase_07 AC 91 ms
82,812 KB
testcase_08 AC 83 ms
78,092 KB
testcase_09 AC 93 ms
83,728 KB
testcase_10 AC 117 ms
94,240 KB
testcase_11 AC 122 ms
97,376 KB
testcase_12 AC 105 ms
89,908 KB
testcase_13 AC 71 ms
71,256 KB
testcase_14 AC 70 ms
71,196 KB
testcase_15 AC 70 ms
71,556 KB
testcase_16 AC 71 ms
71,232 KB
testcase_17 AC 71 ms
71,624 KB
testcase_18 AC 143 ms
106,968 KB
testcase_19 AC 136 ms
103,812 KB
testcase_20 AC 141 ms
107,032 KB
testcase_21 AC 143 ms
107,076 KB
testcase_22 AC 136 ms
103,320 KB
testcase_23 AC 143 ms
107,372 KB
testcase_24 AC 143 ms
106,936 KB
testcase_25 AC 143 ms
106,824 KB
testcase_26 AC 144 ms
107,132 KB
testcase_27 AC 146 ms
107,208 KB
testcase_28 AC 69 ms
71,452 KB
testcase_29 AC 69 ms
71,524 KB
testcase_30 AC 69 ms
71,400 KB
testcase_31 AC 70 ms
71,316 KB
testcase_32 AC 71 ms
71,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

https://yukicoder.me/problems/no/1564


"""

from sys import stdin

N = int(stdin.readline())

A = list(map(int,stdin.readline().split()))
        
    
A.sort()

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

print (ans)
0