Python 3.9 solution
Python 3.9 allows math.gcd() to take an iterable: \nmath.gcd(*integers)\nReturn the greatest common divisor of the specified integer arguments. If any of the ar
Python 3.9 allows math.gcd() to take an iterable: \nmath.gcd(*integers)\nReturn the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest positive integer that is a divisor of all arguments. If all arguments are zero, then the returned value is 0. gcd() without arguments returns 0.\n\nNew in version 3.5.\nChanged in version 3.9: Added support for an arbitrary number of arguments. Formerly, only two arguments were supported.\n\nLeetcode has been using Python 3.9 since 2020-10-20.\n\nSo, Python 3.9 solution is the simplest code that you may have for a "hard" problem:\n```\n    def isGoodArray(self, nums: List[int]) -> bool:\n        return math.gcd(*nums) == 1\n```
[]