Faster than 97% || C++ ||
\nclass Solution\n{\npublic:\n    long long countVowels(string word)\n    {\n        long long int cnt = 0, cur = 0;\n        for (int i = 0; i < word.size(); i
```\nclass Solution\n{\npublic:\n    long long countVowels(string word)\n    {\n        long long int cnt = 0, cur = 0;\n        for (int i = 0; i < word.size(); i++)\n        {\n            if (word[i] == \'a\' || word[i] == \'e\' || word[i] == \'i\' || word[i] == \'o\' || word[i] == \'u\')\n                cur += (i+1);\n            cnt += cur;\n        }\n        return cnt;\n    }\n};\n// add the position(=index+1) art which vowel occurs\n// aeio\n// a 1\n// ae 1+2\n// aei 1+2+3\n// aeio 1+2+3+4\n//  ADD ALL\n```
[]