1926: 【CSP字符串】字符串出现次数▅
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
一个字符串中任意个连续的字符组成的子序列为该字符串的子串。给定子串 s1 和它的一个字符串 s2 ,求 s1 在 s2 中出现的次数。
Input
第一行,表示字符串 s1 , 第二行,表示字符串 s2 。
Output
一个整数,代表 s1 在 s2 中出现的次数。
Sample Input Copy
ab
abbaabcaabc
Sample Output Copy
3