The number of specific digits in the number
Problem
Given a natural number N and the number k. Count the number of times k in number N
Input:
The first line sets the number N (N> 0)
The second line contains the number k (0 <= k <= 9)
Output:
It is necessary to print the number of digits k in the number N
Examples
№ |
Input |
Output |
1 |
5345
5 |
2 |
Запрещенные операторы: list
; [
; find
; index