結果
問題 | No.430 文字列検索 |
ユーザー |
|
提出日時 | 2022-01-30 12:26:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 111 ms / 2,000 ms |
コード長 | 258 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 77,696 KB |
最終ジャッジ日時 | 2024-11-10 00:58:35 |
合計ジャッジ時間 | 2,264 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
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)