#251. 统计数组中数字9的个数

    ID: 251 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-2gesp1循环结构条件结构

统计数组中数字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 99 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 99 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 99. Sample 2: The array [1 9 9] contains two 99s. Sample 3: The array [1 9 9 3 9] contains three 99s.

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.