結果

問題 No.723 2つの数の和
ユーザー 12354865271235486527
提出日時 2019-12-27 21:15:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 26,396 KB
最終ジャッジ日時 2023-07-30 15:48:01
合計ジャッジ時間 2,582 ms
ジャッジサーバーID
(参考情報)
judge5 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,588 KB
testcase_01 AC 17 ms
8,380 KB
testcase_02 AC 19 ms
8,412 KB
testcase_03 AC 74 ms
19,104 KB
testcase_04 AC 87 ms
20,844 KB
testcase_05 AC 86 ms
20,284 KB
testcase_06 AC 84 ms
20,396 KB
testcase_07 AC 51 ms
14,080 KB
testcase_08 AC 55 ms
14,412 KB
testcase_09 AC 89 ms
21,552 KB
testcase_10 AC 50 ms
14,044 KB
testcase_11 AC 25 ms
9,900 KB
testcase_12 AC 61 ms
14,704 KB
testcase_13 AC 89 ms
21,188 KB
testcase_14 AC 37 ms
11,552 KB
testcase_15 AC 50 ms
14,248 KB
testcase_16 AC 66 ms
18,564 KB
testcase_17 AC 78 ms
20,148 KB
testcase_18 AC 41 ms
9,560 KB
testcase_19 AC 54 ms
16,124 KB
testcase_20 AC 17 ms
8,552 KB
testcase_21 AC 17 ms
8,564 KB
testcase_22 AC 17 ms
8,412 KB
testcase_23 AC 90 ms
26,396 KB
testcase_24 AC 41 ms
13,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

_, X = map(int, input().split())
C = collections.Counter(map(int, input().split()))
s = 0
for c in C:
    s += C[X-c] * C[c]
print(s)
0