On Fri, Sep 5, 2008 at 2:26 AM, Robert Dober <robert.dober / gmail.com> wrote:
> I believe it can easily be seen that a number of form xy or abc where
> xy and abc are not ordered in ascending order
> cannot yield a solution hence:

Building on that observation:

#!/usr/bin/env ruby

digits = [3, 4, 5, 6, 7]

digits.sort!

multiplier   = "#{digits.shift}"
multiplicand = "#{digits.shift}"

multiplier   << "#{digits.shift}"
multiplicand << "#{digits.shift}"

multiplicand << "#{digits.shift}"

product = multiplicand.to_i * multiplier.to_i

puts "#{multiplicand} * #{multiplier} = #{product}"
# => 467 * 35 = 16345