You are given an integer
n.The score of
nis defined as the sum ofd * freq(d)over all distinct digitsd, wherefreq(d)denotes the number of times the digitdappears inn.Return an integer denoting the score of
n.
1 | class Solution { |
You are given an integer
n.The score of
nis defined as the sum ofd * freq(d)over all distinct digitsd, wherefreq(d)denotes the number of times the digitdappears inn.Return an integer denoting the score of
n.
1 | class Solution { |