Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution(object):
- def subtractProductAndSum(self, n):
- """
- :type n: int
- :rtype: int
- """
- count = 1
- for i in str(n):
- count = count * int(i)
- return(count - sum(map(int,str(n))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement