結果

問題 No.430 文字列検索
ユーザー kohei2019kohei2019
提出日時 2022-01-30 12:26:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 78,768 KB
最終ジャッジ日時 2023-09-02 01:31:30
合計ジャッジ時間 3,756 ms
ジャッジサーバーID
(参考情報)
judge12 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,768 KB
testcase_01 AC 161 ms
78,768 KB
testcase_02 AC 152 ms
78,672 KB
testcase_03 AC 149 ms
78,668 KB
testcase_04 AC 90 ms
71,644 KB
testcase_05 AC 91 ms
71,884 KB
testcase_06 AC 89 ms
71,616 KB
testcase_07 AC 90 ms
71,620 KB
testcase_08 AC 134 ms
77,644 KB
testcase_09 AC 91 ms
71,720 KB
testcase_10 AC 105 ms
77,432 KB
testcase_11 AC 156 ms
78,628 KB
testcase_12 AC 157 ms
78,592 KB
testcase_13 AC 159 ms
78,660 KB
testcase_14 AC 158 ms
78,756 KB
testcase_15 AC 158 ms
78,752 KB
testcase_16 AC 153 ms
78,720 KB
testcase_17 AC 152 ms
78,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
S = input()
N = len(S)
M = int(input())
lsC = [input() for i in range(M)]
cnt = collections.Counter(lsC)
ans = 0
for i in range(N):
    for j in range(1,11):
        if N < i+j:
            continue
        ans += cnt[S[i:i+j]]
print(ans)
0