All Submissions


Given a string ,find how many of its substring has exactly N 'Y' characters

Input:
Input will contain many test cases (<=10).,each on a new line
A test case will contain a string of length <=100000 , and the value of N(<=100000), seperated by space
String will contain characters A-Z only.

Output:
For Each test case,print number of substring having N 'Y' characters

Sample Input:
JAYANTBIT 1
ACYYDQYXYY 4
YXYY 3
ACMYYY 4
TKJ 1



Sample Output:
21
4
1
0
0


Editorial:
Setter : Jayant Mukherji

Languages: AWK,Bash,Brain,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text

Time Limit: 3 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0