Solution for project004, slow for palindromes made up of 5 digits or more