C# short, GCD
Here d is a GCD for first i numbers.\n\n\tpublic bool IsGoodArray(int[] nums) {\n        int d = nums[0];\n        for(int i = 1; i < nums.Length; i++) {\n     
Here d is a GCD for first i numbers.\n```\n\tpublic bool IsGoodArray(int[] nums) {\n        int d = nums[0];\n        for(int i = 1; i < nums.Length; i++) {\n            if(d == 1) break;\n            int r = nums[i];\n            while((r %= d) > 0) {\n                int t = d;\n                d = r;\n                r = t;\n            }\n        }\n        return d == 1;\n    }\n```
[]