結果

問題 No.723 2つの数の和
ユーザー c-yanc-yan
提出日時 2021-01-01 02:59:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 10,476 KB
実行使用メモリ 22,740 KB
最終ジャッジ日時 2023-07-31 11:47:59
合計ジャッジ時間 3,311 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,492 KB
testcase_01 AC 18 ms
8,592 KB
testcase_02 AC 18 ms
8,592 KB
testcase_03 AC 76 ms
17,804 KB
testcase_04 AC 97 ms
19,224 KB
testcase_05 AC 87 ms
18,956 KB
testcase_06 AC 95 ms
18,852 KB
testcase_07 AC 50 ms
13,412 KB
testcase_08 AC 54 ms
13,876 KB
testcase_09 AC 104 ms
19,244 KB
testcase_10 AC 47 ms
14,252 KB
testcase_11 AC 24 ms
9,836 KB
testcase_12 AC 61 ms
15,388 KB
testcase_13 AC 102 ms
19,864 KB
testcase_14 AC 36 ms
11,832 KB
testcase_15 AC 50 ms
14,672 KB
testcase_16 AC 73 ms
16,956 KB
testcase_17 AC 85 ms
18,712 KB
testcase_18 AC 65 ms
10,324 KB
testcase_19 AC 83 ms
19,924 KB
testcase_20 AC 18 ms
8,444 KB
testcase_21 AC 18 ms
8,404 KB
testcase_22 AC 18 ms
8,404 KB
testcase_23 AC 85 ms
22,740 KB
testcase_24 AC 42 ms
12,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N, X, *a = map(int, open(0).read().split())

c = Counter(a)
result = 0
for i in range(N):
    result += c[X - a[i]]
print(result)
0