python easy solution
\nclass ProductOfNumbers:\n    def __init__(self):\n        self.arr = [1]        \n\n    def add(self, num: int) -> None:\n        if num == 0:\n            se
```\nclass ProductOfNumbers:\n    def __init__(self):\n        self.arr = [1]        \n\n    def add(self, num: int) -> None:\n        if num == 0:\n            self.arr = [1]\n        else:\n            self.arr.append(self.arr[-1]*num)\n    def getProduct(self, k: int) -> int:\n        if k >= len(self.arr):\n            return 0\n        \n        return (self.arr[-1]//self.arr[-k-1])\n```
[]