結果

問題 No.723 2つの数の和
ユーザー pluto77pluto77
提出日時 2018-08-05 11:54:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 7,156 KB
実行使用メモリ 20,308 KB
最終ジャッジ日時 2023-10-19 22:04:08
合計ジャッジ時間 3,341 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,812 KB
testcase_01 AC 13 ms
6,812 KB
testcase_02 AC 13 ms
6,812 KB
testcase_03 AC 112 ms
13,224 KB
testcase_04 AC 145 ms
14,824 KB
testcase_05 AC 134 ms
13,996 KB
testcase_06 AC 138 ms
14,500 KB
testcase_07 AC 71 ms
12,244 KB
testcase_08 AC 77 ms
12,408 KB
testcase_09 AC 152 ms
15,120 KB
testcase_10 AC 67 ms
12,176 KB
testcase_11 AC 24 ms
8,148 KB
testcase_12 AC 86 ms
12,576 KB
testcase_13 AC 157 ms
15,312 KB
testcase_14 AC 44 ms
8,740 KB
testcase_15 AC 73 ms
12,292 KB
testcase_16 AC 104 ms
12,960 KB
testcase_17 AC 132 ms
13,860 KB
testcase_18 AC 97 ms
8,240 KB
testcase_19 AC 115 ms
15,372 KB
testcase_20 AC 13 ms
6,812 KB
testcase_21 AC 13 ms
6,812 KB
testcase_22 AC 13 ms
6,812 KB
testcase_23 AC 120 ms
20,308 KB
testcase_24 AC 56 ms
11,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki723
import collections

n,x=map(int,raw_input().split())
a=map(int,raw_input().split())
c=collections.Counter(a)
cnt=0
for b in a:
 cnt+=c[x-b]
print cnt
0