Andrew is newly enrolled in the computer algorithm basic course. He is having problem with string manipulation. You are assigned to help Andrew in developing a python program which takes an input an ABC string and output an integer denoting the number of substrings of S, which have an equal number of 'A'-s, 'B'-s and 'C'-s. The answer can go above a 32-bit integer. Please, use 64-bit integers for storing and processing data. (Python Basic)
Input:
ABACABAABACABA
Output:
7
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here