We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7995c3 commit a0ba572Copy full SHA for a0ba572
Python/vowels-of-all-substrings.py
@@ -8,4 +8,4 @@ def countVowels(self, word):
8
:rtype: int
9
"""
10
VOWELS = set("aeiou")
11
- return sum((i+1) * (len(word)-i) for i, c in enumerate(word) if c in VOWELS)
+ return sum((i-0+1) * ((len(word)-1)-i+1) for i, c in enumerate(word) if c in VOWELS)
0 commit comments