Find the Punishment Number of an Integer | Leetcode 2698