Sponsored
Use these hints if you're stuck. Try solving on your own first.
Since generating substrings is not an option, can we count the number of substrings a vowel appears in?
How much does each vowel contribute to the total sum?
Solve with full IDE support and test cases