C++ easy solution using maths
class Solution {\npublic:\n    long long countVowels(string s) {\n        long long res=0;\n        for(int i=0;i<s.length();i++)\n\n        {\n            if(s
class Solution {\npublic:\n    long long countVowels(string s) {\n        long long res=0;\n        for(int i=0;i<s.length();i++)\n\n        {\n            if(s[i]==\'a\'||s[i]==\'e\'||s[i]==\'o\'||s[i]==\'u\'||s[i]==\'i\')\n            {\n                res=res+(s.length()-i)*(i+1);\n            }\n                \n        }\n        return res;\n        \n    }\n};
[]