結果

問題 No.723 2つの数の和
ユーザー kohei2019
提出日時 2022-03-26 11:12:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 82,468 KB
実行使用メモリ 99,200 KB
最終ジャッジ日時 2024-10-15 03:07:59
合計ジャッジ時間 3,229 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N,X = map(int,input().split())
lsa = list(map(int,input().split()))
cnt = collections.Counter(lsa)
ans = 0
for i in range(N):
    ans += cnt[X-lsa[i]]
print(ans)
0