Game of Revenge(Very-Easy)

0

0 votes
Easy
Problem

As we know Prince Batra is most intelligent boy of Nehru Hall but one day Rohit says to Prince  "Tumse Naa Ho Paayega"  . To prove Rohit wrong Prince challenges to Rohit to give any problem and he will solve it . So Rohit gave the following problem : 

Given a string S , A substring of S is said to be special if either of the property satisfies : 

  • Substring starts with vowel and end with consonant . 
  • Substring start with consonant and end with vowel . 

Find total number of special substrings of S.

Help Rohit to solve the problem and make him prove that he is most intelligent guy of Nehru Hall.

INPUT FORMAT

  • First line contain t denoting number of testcases.
  • Each testcase has a string S.

OUTPUT FORMAT:

  • For each testcase output number of  Special substring of S in newline.

CONSTRAINTS:

1<T<100

1<length(S)<5*105

0<count of substring<106

Sample Input
2
aba
aa
Sample Output
2
0
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?