Easy c++ solution, simple


#1

int Solution::solve(string A) {
int a[]={‘a’, ‘e’, ‘i’, ‘o’, ‘u’, ‘A’, ‘E’, ‘I’, ‘O’, ‘U’};
int n=A.size();
int count=0;
for(int i=0;i<n;i++){
for(int j=0;j<10;j++){
if(A[i]==a[j]){
count+=n-i;
}
}
}
return count% 10003;
}