CT108

Counting Ink Marks

EasyL1 · Pixel PusherAcceptance: 0.0%XP: 5

A calligrapher checks how often a chosen mark appears in an inscription. Task: Count occurrences of character c in token string s. Input format: A token string s followed by one visible ASCII character c. Output format: Print exact, case-sensitive matches; s contains no whitespace. Constraints: 1 <= length(s) <= 1000

Example 1:

Input: banana a
Output: 3

Example 2:

Input: CodeTikki i
Output: 2

Example 3:

Input: paper z
Output: 0

Constraints:

1 <= length(s) <= 1000

Tags:

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