#302. 字符串特定模式计数
字符串特定模式计数
Count "co_e" Occurrences
Background
Dawei is studying string pattern matching problems.
Problem Description
Return the number of times that the string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
Input Format
Input is given from Standard Input in the following format.
A single line containing a string .
Output Format
Output is to Standard Output in the following format.
A single line containing an integer, representing the number of occurrences of the pattern.
Sample
aaacodebbb
1
codexxcode
2
cozexxcope
2
Sample Explanation
Sample 1: In the string "aaacodebbb\