結果

問題 No.723 2つの数の和
ユーザー c-yanc-yan
提出日時 2021-01-01 02:59:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 25,132 KB
最終ジャッジ日時 2024-04-18 12:05:12
合計ジャッジ時間 3,164 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 28 ms
10,624 KB
testcase_03 AC 89 ms
19,044 KB
testcase_04 AC 106 ms
20,696 KB
testcase_05 AC 111 ms
20,416 KB
testcase_06 AC 111 ms
20,908 KB
testcase_07 AC 65 ms
16,560 KB
testcase_08 AC 72 ms
16,880 KB
testcase_09 AC 123 ms
20,856 KB
testcase_10 AC 64 ms
15,912 KB
testcase_11 AC 37 ms
12,032 KB
testcase_12 AC 77 ms
16,508 KB
testcase_13 AC 122 ms
21,236 KB
testcase_14 AC 48 ms
13,824 KB
testcase_15 AC 67 ms
16,576 KB
testcase_16 AC 84 ms
19,664 KB
testcase_17 AC 109 ms
20,152 KB
testcase_18 AC 84 ms
12,544 KB
testcase_19 AC 102 ms
20,828 KB
testcase_20 AC 28 ms
10,752 KB
testcase_21 AC 29 ms
10,624 KB
testcase_22 AC 29 ms
10,624 KB
testcase_23 AC 104 ms
25,132 KB
testcase_24 AC 53 ms
15,164 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