146 ms
rust\nimpl Solution {\n    pub fn max_div_score(mut a: Vec<i32>, mut b: Vec<i32>) -> i32 {\n        a.sort(); b.sort(); let az = a.len();\n        let (mut r, m
```rust\nimpl Solution {\n    pub fn max_div_score(mut a: Vec<i32>, mut b: Vec<i32>) -> i32 {\n        a.sort(); b.sort(); let az = a.len();\n        let (mut r, mut m, mut s, mut p) = (0, -1, 0usize, 0);\n        for d in b {\n            if d == p { continue } else { p = d }\n            while s < az && a[s] < d { s += 1 }\n            if (az - s) as i32 <= m { break }\n            let mut c = 0;\n            for j in s..az {\n                if a[j] % d == 0 { c += 1 }\n            }\n            if c > m { r = d; m = c }\n        }\n        r\n    }\n}\n```
['Rust']