def solve(self, A):

c=0

for i in range(len(A)):

if(A[i] in [‘A’,‘E’,‘I’,‘O’,‘U’,‘a’,‘e’,‘i’,‘o’,‘u’]):

c=c+(len(A)-i)

return c%10003

# An Easy Python Solution

As per the question output should be :

“Return a single integer **X mod 10003**, here X is number of Amazing Substrings in given string.”

That’s why the returned value is c%10003.

Please read the question again.

As it is required to get the correct output, but i think the other reason as it is mentioned in the constraints the input may be large upto 1e6 to get it reduced to integer range mod 10003 is performed