結果

問題 No.723 2つの数の和
ユーザー nohakai3
提出日時 2022-11-04 20:43:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 99,072 KB
最終ジャッジ日時 2024-07-18 18:31:51
合計ジャッジ時間 3,404 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
l=list(map(int,input().split()))
from collections import Counter
c=Counter(l)
ans=0
for x in l:
    if m-x==x:
        ans+=c[x]
    else:
        ans+=c[m-x]
print(ans)
0