#3153

Sum of Digit Differences of All Pairs

specialist · 980 · lc medium +32 · 43% accepted · 225 likes · top 24%

Description

Given an array nums of positive integers all having the same digit count, the digit difference between two integers is the number of positions where their digits disagree. Return the total digit differences summed over all pairs.

Code

1
2
3