Tap here to switch tabs
Problem
Submissions

Problem: Subtract the Product and Sum of Digits of an Integer

Subtract the Product and Sum of Digits of an Integer gives you a positive integer and asks you to return the product of its digits minus their sum.

Statement

Given an integer n, compute and return the difference between the product of its digits and the sum of its digits.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Subtract the Product and Sum of Digits of an Integer

Subtract the Product and Sum of Digits of an Integer gives you a positive integer and asks you to return the product of its digits minus their sum.

Statement

Given an integer n, compute and return the difference between the product of its digits and the sum of its digits.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5