If that doesn't work, you'll need to do the same thing with 8s and stop incrementing as soon as the result goes over 900,000, and so on in that order until all humans are eaten. ]]>

This point is an error if you consider the first one where you only go until 100.

Following your first point, means that you only do 999 * 900 iterations as opposed to 999 * 999. Why? you stop at 100. This means that you don't consider 999 * 99, 999 * 98, and so on.

Remember: the number of digits from 100 to 999 = (999 - 100) + 1 = 900.

]]>maxnum = 0

for i in range(990, 99, -11):

for j in range(999, i, -1):

num = i * j

if num <= maxnum:

break

else:

strnum = str(num)

if strnum == strnum[::-1]:

maxnum = num

break

print maxnum ]]>

1 2 3 4 5 6 | import timeit ... t1 = timeit.Timer('palindrome()', 'from __main__ import palindrome') print t1.timeit(20) |

When you reach the column of the table of multiple of 11 (990,979,etc.) i think you must multiplicate this number for all the numbers smaller than this, and not only for multiple of 11 smaller than this. For example I don't see 990*989,990*988,etc. that are multiple of 11 too. Don't you think? ]]>

@Seth- No problem. Let me know how far you get.

]]>- 5 digit palindromes are not necessarily divisible by 11, though that doesn't matter too much here as we're looking for 6 digit ones

abcba = 10001a + 1010b + 100c

- quick one liner (takes a few seconds here)

1 | max([x*y for x in range(100,1000) for y in range(100,1000) if str(x*y)==str(x*y)[::-1]]) |

1 2 3 | def is_palin(num): s = str(num) return s == s[::-1] |