Difficulty
Easy
Language
Python
Solution 1 - Digit Extraction with Modulo
Given an integer n, return the difference between the product of its digits and the sum of its digits. Extract each digit using modulo and integer division, accumulating the product and sum along the way.
Solution 2 - String Conversion
Convert the integer to a string to iterate over each character digit. Use int() to convert each character back to an integer for multiplication and addition.