2
def countPairs(self, nums: List[int], k: int) -> int:3
counter = Counter() # hashmap dicitionary of python10
) # ex: 10 = k and we have nums[i] as 12 so gcd will be 211
want = k // x # what do we want from upper ex: we need 515
): # so if we find a number that is divisible by 5 then we can multiply it to 12 and make it a factor of 10 for ex we find 20 so it will be 240 which is divisible by 10 hence we will add it to answer18
] # we are adding the freq as we can find no of numbers that have same factor21
] += 1 # here we are increasing the freq of 2 so that if we find 5 next time we can add these to the answer