結果

問題 No.430 文字列検索
ユーザー matriematrie
提出日時 2020-12-29 21:04:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 185 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-04-15 21:30:25
合計ジャッジ時間 9,391 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 366 ms
11,264 KB
testcase_02 AC 529 ms
11,264 KB
testcase_03 AC 394 ms
11,264 KB
testcase_04 AC 28 ms
10,752 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 28 ms
10,880 KB
testcase_09 AC 28 ms
10,880 KB
testcase_10 AC 31 ms
10,752 KB
testcase_11 AC 1,213 ms
11,264 KB
testcase_12 AC 1,165 ms
11,264 KB
testcase_13 AC 1,149 ms
11,264 KB
testcase_14 AC 994 ms
11,264 KB
testcase_15 AC 942 ms
11,264 KB
testcase_16 AC 719 ms
11,392 KB
testcase_17 AC 704 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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