Problem:-
Max has a string S with length N. He needs to find the number of indices i (1≤i≤N−11≤i≤N−1) such that the i-th character of this string is a consonant and the i+1th character is a vowel. However,she is busy, so she asks for your help.
Note: The letters 'a', 'e', 'i', 'o', 'u' are vowels; all other lowercase English letters are consonants.
Input
For each test case, print a single line containing one integer ― the number of occurrences of a vowel immediately after a consonant
Constraints
Note: The letters 'a', 'e', 'i', 'o', 'u' are vowels; all other lowercase English letters are consonants.
Input
- The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N.
- The second line contains a single string S with length N.
For each test case, print a single line containing one integer ― the number of occurrences of a vowel immediately after a consonant
Constraints
- 1≤T≤1001≤T≤100
- 1≤N≤1001≤N≤100
- SS contains only lowercase English letters
Explanation
.................
Time Limit:1.0 sec(s) for each input file.
Memory Limit:256 MB
Source Limit:1024 KB
0 Comments