Count A+b+c+ Subsequences
easy
1. You are given a string str. 2. You are required to calculate and print the count of subsequences of the nature a+b+c+. For abbc -> there are 3 subsequences. abc, abc, abbc For abcabc -> there are 7 subsequences. abc, abc, abbc, aabc, abcc, abc, abc.
Constraints
0 < str.length <= 10
Format
Input
A string str
Output
count of subsequences of the nature a+b+c+
Example
Sample Input
abcabc
Sample Output
7
Question Video