#3754

Concatenate Non-Zero Digits and Multiply by Sum I

easy · 55.7% accepted · 36 likes · top 49%

math

Description

You are given an integer n.

Form a new integer x by concatenating all the non-zero digits of n in their original order. If there are no non-zero digits, x = 0.

Let sum be the sum of digits in x.

Return an integer representing the value of x * sum.

Solution