結果

問題 No.430 文字列検索
ユーザー matriematrie
提出日時 2020-12-29 17:03:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,475 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,280 KB
最終ジャッジ日時 2024-04-15 17:27:51
合計ジャッジ時間 10,839 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,368 KB
testcase_01 AC 432 ms
11,024 KB
testcase_02 AC 562 ms
11,136 KB
testcase_03 AC 419 ms
11,264 KB
testcase_04 AC 37 ms
10,496 KB
testcase_05 AC 33 ms
10,368 KB
testcase_06 AC 32 ms
10,496 KB
testcase_07 AC 31 ms
10,368 KB
testcase_08 AC 33 ms
11,144 KB
testcase_09 AC 32 ms
10,624 KB
testcase_10 AC 37 ms
10,752 KB
testcase_11 AC 1,475 ms
11,156 KB
testcase_12 AC 1,357 ms
11,280 KB
testcase_13 AC 1,360 ms
11,280 KB
testcase_14 AC 1,146 ms
11,152 KB
testcase_15 AC 1,081 ms
11,060 KB
testcase_16 AC 762 ms
11,168 KB
testcase_17 AC 753 ms
11,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
m=len(s)
n=int(input())
c=0
for _ in [0]*n:
	t=input()
	if t not in s: continue
	r=s
	for _ in [0]*m:
		f=r.find(t)
		if f<0: break
		c+=1
		r=r[f+1:]
print(c)
0