#C9307. Typo Substrings Counting
Typo Substrings Counting
Typo Substrings Counting
Given a string consisting of lowercase English letters, count the number of typo substrings. A typo substring is defined as any maximal contiguous segment where a character repeats consecutively two or more times. For example, in the string success
, there are two typo substrings: cc
and ss
.
Input is read from stdin and the result should be printed to stdout.
inputFormat
The input consists of a single line containing a non-empty string of lowercase English letters.
outputFormat
Output a single integer representing the number of typo substrings found in the given input.## sample
abcdef
0