【入门】字符串出现次数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
一个字符串中任意个连续的字符组成的子序列为该字符串的子串。给定子串s1和它的一个字符串s2,求s1在 s2中出现的次数。
Input Format
第一行, 表示 字符串s1, 第二行,表示字符串s2
Output Format
一个整数,代表s1在s2中出现的次数。
ab
abbaabcaabc
3
Source
字符串
数组及应用4(字符数组和字符串)
- Status
- Done
- Problem
- 8
- Open Since
- 2025-12-12 0:00
- Deadline
- 2025-12-19 23:59
- Extension
- 24 hour(s)