class Solution:

    def subtractProductAndSum(self, n: int) ->int:
        n = list(map(int, str(n)))
        result = n[0]
        for i in n[1:]:
            result *= i
        return result - sum(n)

9d80bc6b361c1b7edebcb9ee5632ea8a8f0f223b
<mask token>

class Solution:
    <mask token>

class Solution:

    def subtractProductAndSum(self, n: int) ->int:
        n = list(map(int, str(n)))
        result = n[0]
        for i in n[1:]:
            result *= i
        return result - sum(n)
