結果
| 問題 |
No.430 文字列検索
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-17 14:54:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 82,292 KB |
| 実行使用メモリ | 83,912 KB |
| 最終ジャッジ日時 | 2025-11-17 14:54:32 |
| 合計ジャッジ時間 | 6,633 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 1 TLE * 2 -- * 11 |
ソースコード
import sys
def input(): return sys.stdin.readline().rstrip('\n')
def check(s, c):
a = 0
for i in range(len(s)-len(c)+1):
if s[i:i+len(c)] == c:
a += 1
return a
def main():
s = input()
m = int(input())
a = 0
for i in range(m):
c = input()
a += check(s, c)
print(a)
if __name__ == '__main__':
main()