Tap here to switch tabs
Problem
Submissions

Problem: Count Digit Appearances

Try to solve the Count Digit Appearances problem.

Statement

You are given an array of integers nums and an integer digit.

Return the total number of occurrences of digit across the decimal representations of all elements in nums.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

  • 1≤1 \leq nums[i] ≤106\leq 10^6

  • 0≤0 \leq digit ≤9\leq 9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Digit Appearances

Try to solve the Count Digit Appearances problem.

Statement

You are given an array of integers nums and an integer digit.

Return the total number of occurrences of digit across the decimal representations of all elements in nums.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

  • 1≤1 \leq nums[i] ≤106\leq 10^6

  • 0≤0 \leq digit ≤9\leq 9