結果

問題 No.723 2つの数の和
ユーザー daku9640
提出日時 2018-08-04 00:58:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,288 KB
最終ジャッジ日時 2024-09-19 17:41:58
合計ジャッジ時間 2,416 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n, x = map(int, input().split())
c = Counter(map(int, input().split()))
print(sum(c[k] * c[x - k] for k, v in c.items() if x - k in c))
0