#3754

Concatenate Non-Zero Digits and Multiply by Sum I

pupil · 420 · lc easy +25 · 55.7% accepted · 36 likes · top 49%

Description

Given an integer n, form integer x by concatenating all non-zero digits of n in order (or set x = 0 if there are none), then return x multiplied by the sum of its digits.

Code

1
2
3