c++ Solution
\ntypedef long long int ll;\nclass Solution\n{\n    bool vowel(char &a)\n    {\n        return a == \'a\' or a == \'e\' or a == \'i\' or a == \'o\' or a == \'u\
```\ntypedef long long int ll;\nclass Solution\n{\n    bool vowel(char &a)\n    {\n        return a == \'a\' or a == \'e\' or a == \'i\' or a == \'o\' or a == \'u\';\n    }\n        \npublic:\n    long long countVowels(string word)\n    {\n        ll res = 0;\n        for (ll i = 0; i < word.size(); i++)\n        {\n            if (vowel(word[i]))\n                res += (i + 1) * (word.size() - i);\n        }\n        return res;\n    }\n};\n```
[]