CT603

Envoy's Painted Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Envoy runs the mill at the floating docks of Skyharbor. Today the books show a list of sigils, and the numbers must be worked out before sundown. 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| <= 180; lowercase letters.

Example 1:

Input: epktdhuqsfwztxffbawzwv uqs
Output: 1

Example 2:

Input: jivypzv ivypz
Output: 1

Example 3:

Input: umnlwaehguzkqewlyfwdpowxuraodtlfkfogpkvmfrqvhbxlubonsmiaxpjbvfbhsaovacmksyrmehfyqqsfjpxlpzirznkretbukohcshdbaibkdbhybrswkidhthrnjlvngmjawquoqlvqzcljkzmqopxemqby kzm
Output: 1

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Envoy's Painted Ledger - EASY Coding Problem | CodeTikki