Easiest Solution CPP beats 90% Easy Maths
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int n=nums.size();\n        if(n==1){\n            if(nums[0]==1)  return true;\n            return false;\n        }\n        int g=nums[0];\n        for(int i=1;i<n;i++)    g=__gcd(nums[i],g);\n        if(g>1) return false;\n        return true;\n    }\n};\n```
['C++']