You are viewing a single comment's thread. Return to all comments →
C# solution
public static int getTotalX(List<int> a, List<int> b) { var multiples = Enumerable .Range(1, 101) .Where(i => b.All(b1 => b1 % i == 0)); var divisors = multiples .Where(m => a.All(a1 => m % a1 == 0)); return divisors.Count(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
C# solution