3754. Concatenate Non-Zero Digits and Multiply by Sum I
You are given an integer
n.Form a new integer
xby concatenating all the non-zero digits ofnin their original order. If there are no non-zero digits,x = 0.Let
sumbe the sum of digits inx.Return an integer representing the value of
x * sum.
1 | class Solution { |