Java solution few lines


#1

public class Solution {
public int solve(String A) {

    String vowel ="aeiouAEIOU";
    int n = A.length();
    int count =0;
    for(int i=0;i<n;i++){
        if(vowel.indexOf(A.charAt(i))!=-1)
            count = count+(n-i);
    }
    
    return count%10003;
}

}