結果

問題 No.723 2つの数の和
ユーザー roaris
提出日時 2019-08-28 19:24:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 99,584 KB
最終ジャッジ日時 2024-11-17 16:28:10
合計ジャッジ時間 2,951 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N, X = map(int, input().split())
a = list(map(int, input().split()))
d = Counter(a)
ans = 0

for k in d.keys():
    ans += d[k] * d[X-k]

print(ans)
0