Killjee and string problem

0

0 votes
Easy
Problem

Killjee gives you two strings S and T. You need to find how many times string T occur in string S as, a substring.

INPUT

Input has two lines, First line contains string S and second line contain string T.

 

OUTPUT

Print frequency of occurence of string T as substring of string S.

 

CONSTRAINTS

  • 1|S||T|107
Sample Input
abab
ab
Sample Output
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

ab occurs 2 times as substring of abab.

Editor Image

?