Short 1-liner - Ruby
\ndef subtract_product_and_sum(n)\n  n.digits.reduce(:*) - n.digits.sum\nend\n\nSadly product is something else...\n\nShorter and more efficient and uglier:\n\n
```\ndef subtract_product_and_sum(n)\n  n.digits.reduce(:*) - n.digits.sum\nend\n```\nSadly `product` is something else...\n\nShorter and more efficient and uglier:\n```\ndef subtract_product_and_sum(n)\n  (d = n.digits).reduce(:*) - d.sum\nend\n```
[]