結果

問題 No.430 文字列検索
ユーザー ああいいああいい
提出日時 2022-03-24 20:33:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 1,431 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 76,660 KB
最終ジャッジ日時 2024-04-21 05:43:02
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,712 KB
testcase_01 AC 106 ms
76,288 KB
testcase_02 AC 89 ms
76,660 KB
testcase_03 AC 89 ms
76,460 KB
testcase_04 AC 36 ms
52,096 KB
testcase_05 AC 33 ms
51,456 KB
testcase_06 AC 35 ms
51,712 KB
testcase_07 AC 40 ms
52,096 KB
testcase_08 AC 69 ms
75,008 KB
testcase_09 AC 39 ms
52,480 KB
testcase_10 AC 46 ms
61,184 KB
testcase_11 AC 92 ms
76,084 KB
testcase_12 AC 90 ms
76,632 KB
testcase_13 AC 93 ms
76,604 KB
testcase_14 AC 95 ms
76,416 KB
testcase_15 AC 94 ms
76,160 KB
testcase_16 AC 90 ms
76,288 KB
testcase_17 AC 93 ms
76,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
M = int(input())
s = set()
for _ in range(M):
    C = input()
    s.add(C)
ans = 0
for i in range(1,11):
    for j in range(len(S) - i+1):
        if S[j:j+i] in s:
            ans += 1
print(ans)
0