CT700

The verses at Brimstone

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the sulphur springs of Brimstone close for winter, Herald must finish the verses 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| <= 157; lowercase letters.

Example 1:

Input: kjzotndrxyspawcoibboqyztcjkxazvzyghj ulnat
Output: 0

Example 2:

Input: lmkliaybdfwmhjfjlrquerbbxdopwunskhbwyfpvzxvpvsbschvizflgazgfcueptxqijpgiatvsiacwiyivdsybddrklxzgfzr wedf
Output: 0

Example 3:

Input: ffszqfplbzmccfcboqpiifxgotmqtqfymsledxlpivxzkgzkohkhzuyzgpqftgljl cfc
Output: 1

Constraints:

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

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