Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Howdy!
The problem is to find which of the two nearest palindromic numbers is closest. If missing one of the pair when both are equally distant is acceptable (as in the problem as laid out here), then slinging strings is both fast and elegant, given that palindromicity is a string property, not a numeric property. The solution Roy_Johnson got into print before I could (and which is a refinement of halley's, attacks the given problem about as elegantly as you can.
yours, Michael In reply to Re^2: Challenge: Nearest Palindromic Number
by herveus
|
|