laziness, impatience, and hubris | |
PerlMonks |
Re^3: Challenge: Nearest Palindromic Numberby Corion (Patriarch) |
on Feb 02, 2005 at 21:14 UTC ( [id://427435]=note: print w/replies, xml ) | Need Help?? |
I thought so too, but there are close palindromic numbers that do not even have any digits in common, for example 197 has 191 (6) according to my hypothesis, but 202 is closer (5). I think I'll be cutting my losses and exhaustively search the space above the number, up to the distance to the (easily found) next smaller palindromic number. Not elegant.
In Section
Seekers of Perl Wisdom
|
|