Very Easy Simple Problem Formula || C++ 
IntuitionTotal Substrings Including Character at
𝑖
i:Each starting point can pair with any valid ending point to form a substring. Therefore, the total number o
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Total Substrings Including Character at 
𝑖
i:

Each starting point can pair with any valid ending point to form a substring. Therefore, the total number of substrings that include the character at 
𝑖
i is:
Count
=
(
𝑖
+
1
)
×
(
𝑛
−
𝑖
)
Count=(i+1)×(n−i)
# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    long long countVowels(string s) {
        long long ans = 0, n = s.length();
        for(int i = 0; i < s.length(); i++){
            if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u'){
                ans += (n-i)*(i+1);
            }
        }

        return ans;
    }
};
```
['C++']