http://projecteuler.net/index.php?section=problems&id=4
projecteuler.net第四题
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.
回文数(palindromic number)的值是指类似121对称的数字,将该数按照相反的顺序排列后,所得到的数和原来的一样。找出由两个三位数相乘所得了最大回文数。
答案:906609
python code:
print max(x*y for x in xrange(100,999) for y in xrange(x,999) if str(x*y)==str(x*y)[::-1])