結果

問題 No.723 2つの数の和
ユーザー kohei2019kohei2019
提出日時 2022-03-26 11:12:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 82,224 KB
実行使用メモリ 99,572 KB
最終ジャッジ日時 2024-04-23 03:35:29
合計ジャッジ時間 3,157 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
54,272 KB
testcase_01 AC 40 ms
54,788 KB
testcase_02 AC 41 ms
53,564 KB
testcase_03 AC 78 ms
87,304 KB
testcase_04 AC 85 ms
94,636 KB
testcase_05 AC 84 ms
92,252 KB
testcase_06 AC 82 ms
93,252 KB
testcase_07 AC 64 ms
77,612 KB
testcase_08 AC 67 ms
78,300 KB
testcase_09 AC 89 ms
96,796 KB
testcase_10 AC 62 ms
75,224 KB
testcase_11 AC 51 ms
65,972 KB
testcase_12 AC 70 ms
81,140 KB
testcase_13 AC 87 ms
94,696 KB
testcase_14 AC 55 ms
70,616 KB
testcase_15 AC 62 ms
77,996 KB
testcase_16 AC 70 ms
85,312 KB
testcase_17 AC 76 ms
91,732 KB
testcase_18 AC 66 ms
82,512 KB
testcase_19 AC 68 ms
85,700 KB
testcase_20 AC 41 ms
54,176 KB
testcase_21 AC 41 ms
54,596 KB
testcase_22 AC 40 ms
54,496 KB
testcase_23 AC 84 ms
99,572 KB
testcase_24 AC 59 ms
73,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N,X = map(int,input().split())
lsa = list(map(int,input().split()))
cnt = collections.Counter(lsa)
ans = 0
for i in range(N):
    ans += cnt[X-lsa[i]]
print(ans)
0