Tap here to switch tabs
Problem
Submissions

Problem: Concatenate Non-Zero Digits and Multiply by Sum I

Try to solve the Concatenate Non-Zero Digits and Multiply by Sum I problem.

Statement

You are given an integer n.

Form an integer x by concatenating all digits of n that are not equal to 00, preserving their original relative order. If n has no digits other than 00, then x is equal to 00.

Let sum be the sum of all digits in x.

Return the product of x and sum.

Constraints:

  • 0≤0 \leq n ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Concatenate Non-Zero Digits and Multiply by Sum I

Try to solve the Concatenate Non-Zero Digits and Multiply by Sum I problem.

Statement

You are given an integer n.

Form an integer x by concatenating all digits of n that are not equal to 00, preserving their original relative order. If n has no digits other than 00, then x is equal to 00.

Let sum be the sum of all digits in x.

Return the product of x and sum.

Constraints:

  • 0≤0 \leq n ≤109\leq 10^9