#251. 统计数组中数字9的个数
统计数组中数字9的个数
Count Nines in Array
Background
Dawei is organizing a list of numbers and wants to know how many of a specific number are present.
Problem Description
Given an array of integers, return the number of times the digit appears in the array.
Input Format
The input consists of a single line containing several space-separated integers, representing the elements of the array.
Output Format
Output a single integer, representing the number of times the digit appears in the array.
Sample
1 2 9
1
1 9 9
2
1 9 9 3 9
3
Sample Explanation
Sample 1: The array [1 2 9] contains one .
Sample 2: The array [1 9 9] contains two s.
Sample 3: The array [1 9 9 3 9] contains three s.
Constraints
Time limit: second, Memory limit: KiB for each test case.