1969. Minimum Non-Zero Product of the Array Elements Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 1969class Solution: def minNonZeroProduct(self, p: int) -> int: mod = 10**9 + 7 return (2**p - 1) * pow(2**p - 2, 2 ** (p - 1) - 1, mod) % mod