QWERTY01 - How many words(SHELL)
How many times(SHELL)
Problem Statement:
You are provided with a word to search. You have to search how many times that word appears in the given list of words.
Input Specification:
The first line contains a word which should be searched. Then the words in the list are provided one per line. "end" denotes the end of the list.
Output Specification:
Just print the number of occurances of the searched word in the given list
Input Constraints:
Length of any word <=30
Number of words in the search list <=100
The word to search ≠ “end”
Sample Input:
i++
i++
is
awesome
i++
is
amazing
i
love
i++
end
Output:
3
Added by: | cegprakash |
Date: | 2012-01-09 |
Time limit: | 1s |
Source limit: | 500B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | BASH |