Bad troubles at ACM ICPC
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Huseyn, Ibrahim and Alakbar participate at ACM ICPC competition. They try to solve the next problem:
You have a string with alphabetical characters and question marks. You can put any alphabetical character instead of any question mark. Count how many substrings can consist of only one symbol. ADA university's team feel themselves so bad (it is look like they have COVID-19) and you must help them to solve this problem.
Input
Contains a string, its length does not exceed 10^6
. The string consists of lowercase Latin letters and question marks.
Output
Print the answer to this problem.
Examples
Input #1
Answer #1
Input #2
Answer #2
Note
For the first example the strings that can consist of one symbol are: [1,1], [2,2], [3,3], [4,4], [2,3], [3,4].
Submissions 54
Acceptance rate 41%