結果
| 問題 | No.430 文字列検索 | 
| コンテスト | |
| ユーザー |  ntuda | 
| 提出日時 | 2024-02-13 21:17:24 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 219 ms / 2,000 ms | 
| コード長 | 249 bytes | 
| コンパイル時間 | 141 ms | 
| コンパイル使用メモリ | 82,204 KB | 
| 実行使用メモリ | 164,308 KB | 
| 最終ジャッジ日時 | 2024-11-10 01:10:09 | 
| 合計ジャッジ時間 | 2,496 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 14 | 
ソースコード
S = input()
N = len(S)
from collections import defaultdict
dic = defaultdict(int)
for i in range(1, 11):
    for j in range(N + 1 - i):
        dic[S[j:j + i]] += 1
ans = 0
for _ in range(int(input())):
    C = input()
    ans += dic[C]
print(ans)
            
            
            
        