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