Problem list
Log in
#r03086 · Online Judge > GoldOJ

Count a Substring (Case Insensitive)

Bronze II 2.0 s 1024 MB

Strings $S$ and $T$ are given (one per line). Ignoring letter case, print how many times $T$ occurs in $S$, counted without overlaps.

Input

Line 1: $S$ (length 1 to 200). Line 2: $T$ (length 1 to 20). Letters.

Output

Print the case-insensitive occurrence count.

Example 1

Input
PythonPythonPYTHON
python
Output
3

Example 2

Input
aAaAa
aa
Output
2
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code