From: Brian Candler Date: 2008-09-05T16:49:25+09:00 Subject: Re: Need a 40 LOC (ignoring comments) to be shorter -- suggestions wanted My final offering, inspired by Park Heesob's solution. p (34567..76543).map { |x| [x/100 * (x%100), x] if x.to_s !~ /[^3-7]|(.).*\1/ }.compact.min => [product, nnnmm] Regards, Brian.