Problem J
Subsequences in Substrings
You are given two strings
Note that a
If
Input
Each test case will consist of exactly two lines.
The first line will contain string
The second line will contain string
Output
Output a single integer, which is the number of substrings
of
Sample Input 1 | Sample Output 1 |
---|---|
abcdefghijklmnopqrstuvwxyz a |
26 |
Sample Input 2 | Sample Output 2 |
---|---|
abcdefghijklmnopqrstuvwxyz m |
182 |
Sample Input 3 | Sample Output 3 |
---|---|
penpineappleapplepen ppap |
68 |