結果

問題 No.723 2つの数の和
ユーザー 👑 H20H20
提出日時 2020-12-01 14:51:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 105,772 KB
最終ジャッジ日時 2023-10-11 03:35:03
合計ジャッジ時間 4,562 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
71,736 KB
testcase_01 AC 96 ms
71,748 KB
testcase_02 AC 95 ms
71,596 KB
testcase_03 AC 134 ms
94,004 KB
testcase_04 AC 143 ms
100,564 KB
testcase_05 AC 139 ms
98,744 KB
testcase_06 AC 139 ms
98,884 KB
testcase_07 AC 127 ms
85,228 KB
testcase_08 AC 125 ms
86,600 KB
testcase_09 AC 146 ms
100,440 KB
testcase_10 AC 120 ms
84,644 KB
testcase_11 AC 109 ms
78,088 KB
testcase_12 AC 125 ms
88,692 KB
testcase_13 AC 142 ms
100,484 KB
testcase_14 AC 112 ms
81,120 KB
testcase_15 AC 118 ms
85,736 KB
testcase_16 AC 130 ms
92,384 KB
testcase_17 AC 137 ms
97,460 KB
testcase_18 AC 121 ms
89,944 KB
testcase_19 AC 124 ms
91,700 KB
testcase_20 AC 94 ms
71,588 KB
testcase_21 AC 94 ms
71,704 KB
testcase_22 AC 95 ms
71,788 KB
testcase_23 AC 139 ms
105,772 KB
testcase_24 AC 115 ms
82,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N,X = map(int,input().split())
A = list(map(int,input().split()))
C =  collections.Counter(A)
cnt = 0
for i in range(N):
    if X-A[i]>=0:
        cnt += C[X-A[i]]

print(cnt)
0