🔥BEATS 💯 % 🎯 |✨SUPER EASY FOR BEGINNERS 👏
Please upvote me it would encourage me alotCode
# ***Please upvote me it would encourage me alot***
# Code
```python3 []
class Solution:
    def subtractProductAndSum(self, n: int) -> int:

        s = [int(i) for i in str(n)]
        
        i = sum(s)
        j = 1
        for k in s:
            j = j*k
        return j - i
```
![ba0bc1d0-c297-43a2-b6a7-e2a943eaa77b_1701996327.3360279.png](https://assets.leetcode.com/users/images/7fd93232-ed9e-4bbc-a598-b17a539e35c2_1737992643.877269.png)

['Python3']