BETA

Difficulty Level: Basic

Submissions: 3448 Accuracy:

17.55%

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 Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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