4 line easy C++ solution


#1

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