Subtract the Product and Sum of Digits of an Integer Problem

Subtract the Product and Sum of Digits of an Integer Problem — ExecCode Easy DSA Practice

Solve the Subtract the Product and Sum of Digits of an Integer problem on ExecCode. Free online easy DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given an integer number n, return the difference between the product of its digits and the sum of its digits.

Examples

Input {"n": 234}; Output 15. Input {"n": 4421}; Output 21

Constraints

1 <= n <= 10^5

Practice Subtract the Product and Sum of Digits of an Integer free on ExecCode. Browse DSA problems, topic map, and placement guides.