結果

問題 No.723 2つの数の和
コンテスト
ユーザー nebukuro09
提出日時 2018-08-03 22:30:44
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 189 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 142 ms
コンパイル使用メモリ 77,340 KB
最終ジャッジ日時 2025-12-04 01:17:00
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import Counter
N, X = map(int, raw_input().split())
A = map(int, raw_input().split())
C = Counter(A)
ans = 0

for a in A:
    if X-a in C:
        ans += C[X-a]

print ans
0