Simple logic | C++
\nclass Solution {\npublic:\n    long long countVowels(string word) {\n        long long n = word.size();\n        long long result = 0;\n        for(long long 
```\nclass Solution {\npublic:\n    long long countVowels(string word) {\n        long long n = word.size();\n        long long result = 0;\n        for(long long i=0;i<n;i++){\n            if(word[i]==\'a\'||word[i]==\'e\'||word[i]==\'i\'||word[i]==\'o\'||word[i]==\'u\'){\n                result += (1 + i + (n-i-1) + ( i * (n-i-1)));\n            }\n        }\n        return result;\n    }\n};\n```
[]