I'm trying to find all possible product of two 3-digit numbers. When I work with small ranges, I'm able to get an output almost instantly but when the ranges are big, it seems to take really long time. I ran the code below and still didn't get an output past 15 minutes. Is there any way to to shorten the time to get the result?a = []for x in 100..999    for y in 100..999        num = (x * y)        unless a.include? num            a.push num        end    endendp a
All Possible Products
ruby;time limit exceeded