PYTHON3 DA JUDA AJOYIB YECHIM $$$
Intuition\n\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Tim
# Intuition\n![Screenshot from 2023-07-28 10-30-09.png](https://assets.leetcode.com/users/images/9befb413-f8af-4795-a01d-855ba43ccd4b_1690522345.1497917.png)\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def subtractProductAndSum(self, n: int) -> int:\n        pro = 1            # n =234\n        summ = 0\n        while n != 0:      # 1st loop     2nd loop    3rd loop \n            last = n % 10  # last =  4    3     2\n            pro *= last    # prod =    1*4 = 4      4*3 = 12    12*2 = 24\n            summ += last   # sums =    0+4 = 4      4+3 = 7     7+2 = 9\n            n = n // 10    # n    =    23           2           0\n\n        return pro - summ  # 24 - 9 = 15  \n\n\n```
['Python3']