1250. Check If It Is a Good Array.cpp
Code\n\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int gd=nums[0];\n        for(int i=0;i<nums.size();i++)\n        gd=__gcd(
**Code**\n```\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int gd=nums[0];\n        for(int i=0;i<nums.size();i++)\n        gd=__gcd(nums[i],gd);\n        return (gd==1);\n    }\n};\n```
['C']