#P125. [KSC003C] 赶集
[KSC003C] 赶集
Source
This problem is adapted from Long Long OJ. All rights reserved.
Problem Description
Given a string consisting only of the characters , count the number of occurrences of the substring (case-sensitive).
Input Format
A single line containing the string ().
Output Format
Let the answer be . If , then is defined as the result of concatenating and into a single number (if any digit in this number is , that digit is ignored). Otherwise (when ), . Output . For example:
- If , (the in is ignored).
- If , .
- If , (the in is ignored).
Samples
Gj
0
ggj
1