CT1553

Yara Counts the verses

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Caravans arrive at the terraced vines of Grapehollow with crates of verses, and Yara the archivist must account for every last one. 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| <= 126; lowercase letters.

Example 1:

Input: vifmivzn vifmi
Output: 1

Example 2:

Input: qdggqtkkxctafhphbekbgglvvpusksqgzeiytnrsrantmnsiagsaoyuredrfsyzmhcepkzmzogujuhguolmgcpymevaw uolm
Output: 1

Example 3:

Input: fhhlcgaroxrwrwiqwkffcbmoaikixlbmsbcq aroxr
Output: 1

Constraints:

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

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