結果

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

ソースコード

diff #

from collections import Counter

n,x=map(int,input().split())
A=list(map(int,input().split()))

cnt=Counter(A)
ans=0
for a in A:
    ans+=cnt[x-a]
print(ans)
0