The Next Palindrome HELP

Can anything find what’s wrong with this code. It works fine for me. I’m i missing something?

look at the constraints of the problem!!! do u think that the number given as input would fit in long long unsigned…!!

I don’t see why not. K is no longer then 1000000. That number more then fits into an unsigned long long variable. And when the input is 1000000 the number that follows is 1000001, which satisfies the condition that the next palindrome that follows is larger then k but still the smallest possible answer. T, or the number of test cases, doesn’t have a restriction, but a user can still enter 1000000 numbers safely.

I was reading the discussion and is there any validity to this comment: “1: I believe the test input is using excessive line-breaks. This is causing runtime errors due to empty inputs. I am going to try my next submission with dealing with empty inputs. This is probably a language and input-method specific issue.” - kOrc

Never mind the wording was tricky. The value entered can be up to 1000000 digits long, not a value >= 1000000.