🔥Java Solution || Easy to Understand
Complexity\n- Time complexity: O(n*m) where n is length of array nums and m is length of array divisors\n Add your time complexity here, e.g. O(n) \n\n- Space c
# Complexity\n- Time complexity: O(n*m) where n is length of array nums and m is length of array divisors\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        int maxScore = 0;\n        int divisor = divisors[0];\n        for(int i = 0; i < divisors.length; i++) {\n            int currentScore = 0;\n            \n            for(int j = 0; j < nums.length; j++) {\n                if(nums[j] % divisors[i] == 0) {\n                    currentScore++;\n                }\n            }\n            if(currentScore == maxScore) {\n                divisor = Math.min(divisor, divisors[i]);\n            }\n            \n            if(currentScore > maxScore) {\n                maxScore = currentScore;\n                divisor = divisors[i];\n            }\n        }\n        return divisor;\n    }\n}\n```
['Java']