結果
| 問題 |
No.430 文字列検索
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-21 13:37:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,956 KB |
| 最終ジャッジ日時 | 2024-11-10 00:37:59 |
| 合計ジャッジ時間 | 3,680 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | WA * 1 TLE * 1 -- * 12 |
ソースコード
source = input()
n = int(input())
match_list = []
for _ in range(n):
match_list.append(input())
n_source = len(source)
answer = 0
for match in match_list:
n_match = len(match)
print(n_match)
for i in range(n_source - n_match + 1):
if match in source[i:i+n_match]:
answer += 1
print(answer)