Golang 0ms O(n) time O(1) space no strconv
\nfunc subtractProductAndSum(n int) int {\n  sum, product := 0, 1\n  \n  for n > 0 {\n    mod := n % 10\n    sum += mod\n    product *= mod\n    \n    n /= 10\n
```\nfunc subtractProductAndSum(n int) int {\n  sum, product := 0, 1\n  \n  for n > 0 {\n    mod := n % 10\n    sum += mod\n    product *= mod\n    \n    n /= 10\n  }\n  \n  return product - sum\n}\n```
['Go']