[Python] Diophantine Equation
This is a multivariate linear Diophantine equation with 1 on the right hand side. It has solution if and only if the gcd of all the numbers in nums divides 1, w
This is a multivariate linear [Diophantine equation](https://en.wikipedia.org/wiki/Diophantine_equation) with 1 on the right hand side. It has solution if and only if the gcd of all the numbers in nums divides 1, which means it must be 1. See [this math stack exchange post](https://math.stackexchange.com/questions/145346/diophantine-equations-with-multiple-variables) for detailed proof.\n```\nclass Solution:\n    def isGoodArray(self, nums: List[int]) -> bool:\n        return gcd(*nums) == 1\n```
['Math', 'Python']