✅Simple Solution in Go and C#✅
\n\n# Complexity\n- Time complexity: O(n*m)\n Add your time complexity here, e.g.  \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n
\n\n# Complexity\n- Time complexity: $$O(n*m)$$\n<!-- Add your time complexity here, e.g.  -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nfunc maxDivScore(nums []int, divisors []int) int {\n    maxCount, index := 0, 0\n    \n    for i := 0; i < len(divisors); i++ {\n        count := 0\n        for j := 0; j < len(nums); j++ {\n            if nums[j] % divisors[i] == 0 {\n                count++\n            }\n        }\n        \n        if count > maxCount || (count == maxCount && divisors[i] < divisors[index]) {\n            maxCount = count\n            index = i\n        }\n    }\n    \n    return divisors[index]\n}\n```\nC#\n```\npublic class Solution {\n    public int MaxDivScore(int[] nums, int[] divisors) {\n        int maxCount = 0;\n        int index = 0;\n        \n        for (int i = 0; i < divisors.Length; i++) {\n            int count = 0;\n            for (int j = 0; j < nums.Length; j++) {\n                if (nums[j] % divisors[i] == 0) {\n                    count++;\n                }\n            }\n            \n            if (count > maxCount || (count == maxCount && divisors[i] < divisors[index])) {\n                maxCount = count;\n                index = i;\n            }\n        }\n        \n        return divisors[index];\n    }\n}\n```\n![a6c83c54-1d1a-4f26-8273-b687d119dd5b_1679889261.1494205.png](https://assets.leetcode.com/users/images/cc82e8aa-dc98-4f10-af4c-64b1528c0fb6_1680844232.130332.png)
['Go', 'C#']