Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.2 kB
6
Indexable
Create a program returning the number of a specific character string in a given sentence.

 

If “ti” is given with the following sentence,

Start eating well with these eighttips for healthy eating, which cover the basics of a healthy diet and good nutrition.

The program should return 4.

 

 

[Constraints]

Total of 10 test cases are given.

A sentence will not exceed 1,000 characters including the spaces.

The given character string would not exceed 10 characters.

Only one character string is searched in a sentence.

 

 

[Input]

The first line of the input file provides the test case number. The next line contains the character string, and the following lines contain the sentence.

 

 

[Output]

The answer to each test case is output. Each line begins with the ‘#x’ symbol. It is followed by a space, and then the answer.

Here, x is the test case number.

 

 


[Input Example]

1
ti
Start eating well with these eight tips for healthy eating, which cover the basics ...
2
ing
The double helix forms the structural basis of semi-conservative DNA replication.1,2 Less ...




#1 4
#2 2