BETA

Submissions : 1566 Accuracy :

17.11

Difficulty of sentence
     

Given a sentence as a string S. Write a program to calculate difficulty of a given sentence. A word in the given string is considered hard if it has 4 consecutive consonants or number of consonants are more than number of vowels. Else the word is easy. Difficulty of sentence is defined as 5*(number of hard words) + 3*(number of easy words).
Note: uppercase and lowercase characters are same.

Input:
First line of input contains a single integer T which denotes the number of test cases. Then T test cases follows. First line of each test case contains a string S which denotes the sentence.

Output:
For each test case print the difficulty of the sentence as described above.

Constraints:
1<=T<=100
1<= length( S ) <= 105

Example:
Input:

1
Difficulty of sentence
Output:
13

**For More Examples Use Expected Output**


Contributor: Harsh Agarwal

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.