Subject: Re: Need a 40 LOC (ignoring comments) to be shorter -- suggestions wanted
From: Brian Candler <B.Candler pobox.com>
Date: Fri, 5 Sep 2008 16:49:25 +0900
References: 313908313911
In-reply-to: 313911
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.