Are you guys actually reading the requirements?

You must be able to find the next palindrome larger than K where K is a number of up to one million decimal digits. That's DIGITS, not absolute...