結果

問題 No.430 文字列検索
ユーザー mlihua09mlihua09
提出日時 2020-08-31 20:56:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 271 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 164,196 KB
最終ジャッジ日時 2024-04-28 11:09:39
合計ジャッジ時間 3,089 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
53,376 KB
testcase_01 AC 271 ms
164,196 KB
testcase_02 AC 113 ms
76,540 KB
testcase_03 AC 113 ms
76,544 KB
testcase_04 AC 41 ms
54,016 KB
testcase_05 AC 41 ms
53,248 KB
testcase_06 AC 41 ms
53,376 KB
testcase_07 AC 42 ms
53,504 KB
testcase_08 AC 239 ms
164,016 KB
testcase_09 AC 44 ms
54,528 KB
testcase_10 AC 65 ms
74,828 KB
testcase_11 AC 141 ms
89,424 KB
testcase_12 AC 142 ms
89,432 KB
testcase_13 AC 145 ms
89,172 KB
testcase_14 AC 133 ms
83,584 KB
testcase_15 AC 126 ms
81,000 KB
testcase_16 AC 116 ms
76,756 KB
testcase_17 AC 113 ms
76,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


S = input()
n = len(S)

from collections import defaultdict

x = defaultdict(int)

for i in range(1, 11):
    
    for j in range(n - i + 1):
        
        x[S[j:j + i]] += 1
        
M = int(input())


print(sum([x[input()] for i in range(M)]))
0