Tap here to switch tabs
Problem
Submissions

Problem: Sum of Integers with Maximum Digit Range

Try to solve the Sum of Integers with Maximum Digit Range problem.

Statement

You are given an integer array nums.

The digit range of an integer is defined as the difference between its largest digit and its smallest digit.

Find the maximum digit range among all elements in nums, and return the sum of all elements that achieve this maximum digit range.

Constraints:

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

  • 10≤10 \leq nums[i] ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sum of Integers with Maximum Digit Range

Try to solve the Sum of Integers with Maximum Digit Range problem.

Statement

You are given an integer array nums.

The digit range of an integer is defined as the difference between its largest digit and its smallest digit.

Find the maximum digit range among all elements in nums, and return the sum of all elements that achieve this maximum digit range.

Constraints:

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

  • 10≤10 \leq nums[i] ≤105\leq 10^5