結果

問題 No.430 文字列検索
ユーザー torikuminotorikumino
提出日時 2019-03-30 15:39:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 248 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 51,520 KB
最終ジャッジ日時 2023-08-09 19:48:47
合計ジャッジ時間 3,808 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,436 KB
testcase_01 AC 248 ms
51,520 KB
testcase_02 AC 193 ms
8,528 KB
testcase_03 AC 205 ms
8,572 KB
testcase_04 AC 18 ms
8,548 KB
testcase_05 AC 18 ms
8,432 KB
testcase_06 AC 19 ms
8,428 KB
testcase_07 AC 18 ms
8,532 KB
testcase_08 AC 234 ms
51,508 KB
testcase_09 AC 18 ms
8,428 KB
testcase_10 AC 36 ms
12,036 KB
testcase_11 AC 210 ms
17,968 KB
testcase_12 AC 213 ms
17,732 KB
testcase_13 AC 218 ms
17,976 KB
testcase_14 AC 201 ms
14,384 KB
testcase_15 AC 200 ms
11,888 KB
testcase_16 AC 203 ms
8,776 KB
testcase_17 AC 200 ms
8,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
s = input()
m = int(input())
a = [Counter(s[j:j+i+1] for j in range(0, len(s)-i)) for i in range(11)]
r = 0
for _ in range(m):
    c = input()
    r += a[len(c)-1][c]
print(r)
0