Mittal and Strings
All submissions for this problem are available.Mittal and his friend are playing a game. They are given two strings S and T of lowercase English alphabets. They have to find how many times string T occurs in string S as a substring. Help Mittal win the game. ###Input First line contains string S Second line contains string T ###Output Output your answer in a single line ###Constraints $1 \leq |S| \leq 10^4$ $1 \leq |T| \leq 10^2$ $S,T$ contains only lowercase English letters ###Example Input aaaa aa ###Example Output 3 Prepared by : [Tarun](https://www.codechef.com/users/tarun003)
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.