You are given a string s and a positive integer k.
Let vowels and consonants denote the number of vowels and consonants in a substring, respectively.
A substring is considered beautiful if:
vowels == consonants
(vowels * consonants) % k
Return the total number of nonempty beautiful substrings in s.
The English vowels are 'a', 'e', 'i', 'o', and 'u'. All other lowercase English letters are consonants.
A substring is a contiguous sequence of characters within a string.
Constraints:
s.length
k
s consists of only lowercase English letters.
You are given a string s and a positive integer k.
Let vowels and consonants denote the number of vowels and consonants in a substring, respectively.
A substring is considered beautiful if:
vowels == consonants
(vowels * consonants) % k
Return the total number of nonempty beautiful substrings in s.
The English vowels are 'a', 'e', 'i', 'o', and 'u'. All other lowercase English letters are consonants.
A substring is a contiguous sequence of characters within a string.
Constraints:
s.length
k
s consists of only lowercase English letters.