Number of Palindromes

SPOJ - NUMOFPAL