Words Containing C
Count how many of the words contain the character C at least once.
Input: the first line has words separated by spaces; the second line has the single character C.
Output: the count of words containing C.
Constraints:
- 1 to 200 lowercase words
Sample Tests
Input 1
apple banana cherry a
Output 1
2
Input 2
dog cat z
Output 2
0
Discussion (opens after you solve — no spoilers before)
No comments yet.