A - wwwvvvvvv
Editorial
/


Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
v
と w
のみからなる文字列 が与えられます。
の中に、下に尖っている部分が何箇所あるかを出力してください(入出力例にある図もご参照ください)。
制約
- は
v
とw
のみからなる文字列 - の長さは 以上 以下
入力
入力は以下の形式で標準入力から与えられる。
出力
答えを整数として出力せよ。
入力例 1Copy
Copy
vvwvw
出力例 1Copy
Copy
7
上の画像のように、vvwvw
という文字列には下に尖った部分が 箇所あります。
入力例 2Copy
Copy
v
出力例 2Copy
Copy
1
入力例 3Copy
Copy
wwwvvvvvv
出力例 3Copy
Copy
12
Score : points
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
v
andw
. - 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 1Copy
Copy
vvwvw
Sample Output 1Copy
Copy
7
The image above shows the seven "bottoms" in the string vvwvw
.
Sample Input 2Copy
Copy
v
Sample Output 2Copy
Copy
1
Sample Input 3Copy
Copy
wwwvvvvvv
Sample Output 3Copy
Copy
12