CT1912

The Coral Pattern Count

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the northern keep of Frostgate close for winter, Eklavya must finish the ribbons ledger - one figure at a time. Task: Count how many times string t occurs inside s (occurrences may overlap). Input format: Two lines: string s, then pattern t. Output format: Print the occurrence count. Constraints: 1 <= |t| <= |s| <= 78; lowercase letters.

Example 1:

Input: pqoxkxclasavabbjtvfnwyixdnlcyisgfasyhdrggbcptidblkufbntfgowxmydnnctpnneyajbzty o
Output: 2

Example 2:

Input: iwtnyfxqolirtnwobsubrmlrhlxkxdtyijtntwqompyyfsvcmrbzwkduuw tn
Output: 3

Example 3:

Input: ivnapkixqbqhnierhhdkoppfghmzyind ki
Output: 1

Constraints:

1 <= |t| <= |s| <= 78; lowercase letters.

Loading...
Test Cases:No test cases
No test cases available.