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.
Example 1:
Input: n = 10203004
Output: 12340
Explanation:
x = 1234.sum = 1 + 2 + 3 + 4 = 10.x * sum = 1234 * 10 = 12340.Example 2:
Input: n = 1000
Output: 1
Explanation:
x = 1 and sum = 1.x * sum = 1 * 1 = 1.
Constraints:
0 <= n <= 109