Project Euler : problem4
問題
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
Find the largest palindrome made from the product of two 3-digit numbers.
回答
res = 0 t = 0 (1..999).each do |x| (1..999).each do |y| t = x * y if t.to_s == t.to_s.reverse if t > res res = t end end end end p res