An Easy Python Solution


def solve(self, A):
for i in range(len(A)):
if(A[i] in [‘A’,‘E’,‘I’,‘O’,‘U’,‘a’,‘e’,‘i’,‘o’,‘u’]):
return c%10003


hey why u should modulus with 10003 can u explain it


Will you read the question again ,please?


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