rust simple one-liner
\nimpl Solution {\n    pub fn subtract_product_and_sum(n: i32) -> i32 {\n        let (p, s) = std::iter::successors(Some(n), |&x| Some(x/10))\n            .take
```\nimpl Solution {\n    pub fn subtract_product_and_sum(n: i32) -> i32 {\n        let (p, s) = std::iter::successors(Some(n), |&x| Some(x/10))\n            .take_while(|&x| x > 0)\n            .map(|x| x%10)\n            .fold((1, 0), |(p, s), x| (p*x, s+x));\n        p - s\n    }\n}\n```
['Rust']