Problem1164--统计存在模式串的行数

1164: 统计存在模式串的行数

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 14  Solved: 9
[Submit] [Status] [Web Board] [Creator:]

Description

在文本中,统计出现模式串的行数。 比如在下面的文本中,出现模式串 student 的行数是3。 请注意,不是出现 student 的次数

Jane is a student.
Bob is also a student.
Tom is a teacher.
Kate is not a teacher. She is a student, good student.

请参考 《C程序设计语言第二版新版》57页

Input

第1行:模式串

第2行至结尾:正文文本

Sample Input

student
Jane is a student.
Bob is also a student.
Tom is a teacher.
Kate is not a teacher. She is a student, good student.

Sample Output

3

Source/Category