結果
問題 |
No.430 文字列検索
|
ユーザー |
|
提出日時 | 2019-11-21 14:30:26 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 755 ms |
コンパイル使用メモリ | 82,472 KB |
実行使用メモリ | 83,576 KB |
最終ジャッジ日時 | 2024-11-10 00:38:22 |
合計ジャッジ時間 | 3,665 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 1 TLE * 1 -- * 12 |
ソースコード
def sliding_window(text, stepSize, windowSize): for t in range(0, len(text), stepSize): yield text[t:t + windowSize] s = str(input()) m = int(input()) c = [str(input()) for i in range(m)] count = 0 for ci in c: for t in sliding_window(s, 1, len(ci)): if t == ci: count += 1 print(count)