Tap here to switch tabs
Problem
Submissions

Problem: Sum of Integers with Maximum Digit Range

Sum of Integers with Maximum Digit Range gives you an integer array and asks for the sum of every number whose largest-to-smallest digit difference is as large as possible.

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

Sum of Integers with Maximum Digit Range gives you an integer array and asks for the sum of every number whose largest-to-smallest digit difference is as large as possible.

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