The Alphabet Chocolate
Practice
4.1 (17 votes)
Basic programming
Basics of implementation
Easy
Implementation
Problem
71% Success 5503 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

A long chocolate was given as a gift to Alice by Bob. The chocolate is a series of square tiles connected to each other in a straight line. Each chocolate piece contains an alphabet carved on it.

Now Alice picks a single part of chocolate and eats it. Taste of a chocolate's part is determined by how many squares are there in that part on which a vowel is carved.

Since there are lots of ways for Alice to choose her chocolate part , find the sum of tastes of all the possible chocolate parts that can be cut out of the given chocolate.

Note- Vowels are the following alphabets :  {'a','e','i','o','u','A','E','I','O','U'}.

Input

First line contains an integer $$T$$, denoting the number of test cases.

Each of the next $$T$$ lines contains a string $$S$$ which denotes the design of the chocolate as mentioned in the problem.

Output

For each test case, print the value of taste sum as mentioned in the problem.
Answer for each test case should be printed in a new line.

Input Constraints

\(1 \le T \le 10\)

\(1 \le |S| \le 10^5\)

String consists of lowercase and/or uppercase English alphabets.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
9 votes
Tags:
Ad-HocBasic ProgrammingEasy
Points:20
186 votes
Tags:
Ad-HocEasyMathOpen
Points:20
77 votes
Tags:
ApprovedBasic ProgrammingEasyImplementationOpen