Easystringsloops
Count a Character
Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0
Statement
The first line contains a string of lowercase Latin letters, the second line contains a single character c. Print how many times c occurs in the string.
Examples
Example 1
Input
banana a
Output
3
Example 2
Input
hello z
Output
0
Constraints
- String length is between 1 and 10^5
- c is a lowercase Latin letter