結果

問題 No.723 2つの数の和
ユーザー nebukuro09nebukuro09
提出日時 2018-08-03 22:30:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 7,144 KB
実行使用メモリ 20,312 KB
最終ジャッジ日時 2023-10-19 21:28:32
合計ジャッジ時間 3,313 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,816 KB
testcase_01 AC 13 ms
6,816 KB
testcase_02 AC 13 ms
6,816 KB
testcase_03 AC 101 ms
13,224 KB
testcase_04 AC 131 ms
14,828 KB
testcase_05 AC 114 ms
14,004 KB
testcase_06 AC 122 ms
14,508 KB
testcase_07 AC 60 ms
12,248 KB
testcase_08 AC 68 ms
12,412 KB
testcase_09 AC 132 ms
14,920 KB
testcase_10 AC 61 ms
12,180 KB
testcase_11 AC 22 ms
8,152 KB
testcase_12 AC 74 ms
12,580 KB
testcase_13 AC 128 ms
15,320 KB
testcase_14 AC 39 ms
8,748 KB
testcase_15 AC 60 ms
12,296 KB
testcase_16 AC 85 ms
12,964 KB
testcase_17 AC 106 ms
13,864 KB
testcase_18 AC 113 ms
8,248 KB
testcase_19 AC 132 ms
15,380 KB
testcase_20 AC 13 ms
6,816 KB
testcase_21 AC 12 ms
6,816 KB
testcase_22 AC 13 ms
6,816 KB
testcase_23 AC 137 ms
20,312 KB
testcase_24 AC 48 ms
11,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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