You are given a string
sconsisting of lowercase English letters, spaces, and digits.Let
vbe the number of vowels insandcbe the number of consonants ins.A vowel is one of the letters
'a','e','i','o', or'u', while any other letter in the English alphabet is considered a consonant.The score of the string
sis defined as follows:
- If
c > 0, thescore = floor(v / c)where floor denotes rounding down to the nearest integer.- Otherwise, the
score = 0.Return an integer denoting the score of the string.
1 | class Solution { |