#abc279a. A - wwwvvvvvv
A - wwwvvvvvv
问题描述
给定一个仅包含字符 v 和 w 的字符串 。
输出字符串 中“bottoms”的数量(请参考示例输入/输出中的图示)。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a string consisting of v and w.
Print the number of "bottoms" in the string (see the figure at Sample Input/Output).
Constraints
- is a string consisting of
vandw. - The length of is between and , inclusive.
Input
The input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
vvwvw
Sample Output 1
7

The image above shows the seven "bottoms" in the string vvwvw.
Sample Input 2
v
Sample Output 2
1
Sample Input 3
wwwvvvvvv
Sample Output 3
12
UPDATE @ 2024/3/12 14:10:47