You are viewing a single comment's thread. Return to all comments →
ruby
def getTotalX(a, b) answer_a = a.reduce(:lcm) answer_b = b.reduce(:gcd) (a.max..b.min).count { |n| n % answer_a == 0 && answer_b % n == 0} end
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 →
ruby