New update is available. Click here to update.

Last Updated: 17 Mar, 2021

Difficulty: Easy

```
You do not need to print anything; it has already been taken care of. Just implement the given function.
```

```
Input: N = 234
Output: 15
Explanation:
Product of digits = 2 * 3 * 4 = 24
Sum of digits = 2 + 3 + 4 = 9
Result = 24 - 9 = 15
```

```
The first line of input contains a single integer ‘T’ denoting the number of test cases.
The second line contains the integer ‘N’ whose difference between the product and the sum of all the digits need to be calculated.
```

```
For each test case print the difference between the product and the sum of all the digits in ‘N’.
```

```
You do not need to print anything; it has already been taken care of. Just implement the given function.
```

```
1 <= T <= 3000
1 <= N <= 10^5
Time Limit: 1 sec
```

SIMILAR PROBLEMS

Ninja And The LCM

Posted: 12 Apr, 2022

Difficulty: Easy

A Number Game

Posted: 23 Apr, 2022

Difficulty: Moderate

Pair Product Div by K

Posted: 15 May, 2022

Difficulty: Moderate

Pair Product Div by K

Posted: 15 May, 2022

Difficulty: Moderate

Merge Two Sorted Arrays Without Extra Space

Posted: 19 Nov, 2022

Difficulty: Moderate

Co-Prime

Posted: 14 Dec, 2022

Difficulty: Hard

Popular Interview Problems: