[Python3] factors
Please pull this commit for solutions of weekly 281. \n\n\nclass Solution:\n    def coutPairs(self, nums: List[int], k: int) -> int:\n        factors = []\n    
Please pull this [commit](https://github.com/gaosanyong/leetcode/commit/793daa0aab0733bfadd4041fdaa6f8bdd38fe229) for solutions of weekly 281. \n\n```\nclass Solution:\n    def coutPairs(self, nums: List[int], k: int) -> int:\n        factors = []\n        for x in range(1, int(sqrt(k))+1):\n            if k % x == 0: factors.append(x)\n        ans = 0 \n        freq = Counter()\n        for x in nums: \n            x = gcd(x, k)\n            ans += freq[k//x]\n            for f in factors: \n                if x % f == 0 and f <= x//f: \n                    freq[f] += 1\n                    if f < x//f: freq[x//f] += 1\n        return ans \n```
['Python3']