Python Solution using dictionary
Complexity
Time complexity:
O(n^2)
Space complexity:
O(n)
Code

# Complexity
- Time complexity:
O(n^2)
- Space complexity:
O(n)
# Code
```python []
class Solution(object):
    def maxDivScore(self, nums, divisors):
        """
        :type nums: List[int]
        :type divisors: List[int]
        :rtype: int
        """
        divisors=list(set(divisors))
        dic= {}
        mini = float("inf")

        for d in divisors:
            dic[d]=0
            for n in nums:
                if n%d==0:
                    dic[d]+=1

        maxi = max(dic.values())
        for i in dic:
            if dic[i]==maxi:
                mini =min(mini,i)
        return mini





```
['Python']