Java
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```java []\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        Map<Integer, Integer> map = new HashMap<>();\n        for (int div : divisors) {\n            if (map.containsKey(div)) continue;\n            map.put(div, 0);\n            for (int num : nums) {\n                if (num % div == 0) {\n                    map.merge(div, 1, (o, n) -> o + 1);\n                }\n            }\n        }\n        int max = -1;\n        int val = 0;\n        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {\n            if (entry.getValue() > max) {\n                max = entry.getValue();\n                val = entry.getKey();\n            }\n            if (entry.getValue() == max) {\n                val = Math.min(val, entry.getKey());\n            }\n        }\n        return val;\n    }\n}\n```
['Java']