結果

問題 No.723 2つの数の和
ユーザー akitsugu777akitsugu777
提出日時 2019-07-12 14:31:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 156 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 24,420 KB
最終ジャッジ日時 2024-04-28 18:39:10
合計ジャッジ時間 3,019 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,496 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 96 ms
19,456 KB
testcase_04 AC 118 ms
20,236 KB
testcase_05 AC 106 ms
20,400 KB
testcase_06 AC 109 ms
20,956 KB
testcase_07 AC 62 ms
16,172 KB
testcase_08 AC 68 ms
17,104 KB
testcase_09 AC 114 ms
20,224 KB
testcase_10 AC 59 ms
16,076 KB
testcase_11 AC 36 ms
11,904 KB
testcase_12 AC 72 ms
16,584 KB
testcase_13 AC 117 ms
20,660 KB
testcase_14 AC 48 ms
13,692 KB
testcase_15 AC 64 ms
16,460 KB
testcase_16 AC 85 ms
19,600 KB
testcase_17 AC 103 ms
20,268 KB
testcase_18 AC 69 ms
12,608 KB
testcase_19 AC 94 ms
20,840 KB
testcase_20 AC 30 ms
10,624 KB
testcase_21 AC 30 ms
10,624 KB
testcase_22 AC 31 ms
10,624 KB
testcase_23 AC 95 ms
24,420 KB
testcase_24 AC 53 ms
15,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

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

d = Counter(a)
l = [d[x-i] for i in a]

print(sum(l))
0