結果

問題 No.723 2つの数の和
ユーザー convexineq
提出日時 2021-02-26 02:18:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 423 ms
コンパイル使用メモリ 82,548 KB
実行使用メモリ 102,528 KB
最終ジャッジ日時 2024-10-01 18:30:18
合計ジャッジ時間 3,865 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n,x = map(int,input().split())
*a, = map(int,input().split())
from collections import Counter
d = Counter(a)
ans = 0
for ai in a:
    v = x-ai
    if v in d:
        ans += d[v]
print(ans)
0