NEXT PALINDROME

please tell me the test case for which i am getting a wrong answer.

http://www.codechef.com/viewsolution/2298931

see input #9 on this link…LINK!!!

i think it is not the correct ans…!!!

the ans should most probably be…

110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011
1 Like

see #11 also!!!

the ans should be 11000000011

agreed with @kunal361 the outputs of the case 9 and 11 are actually smaller than the input, but the “next” palindrome will be greater than the input.

Input :

2

868679009

868689009

Your Output :

868676868

868686868

Correct Output :

868686868

868696868

3 Likes

please tell me why i am getting wrong answer.
http://www.codechef.com/viewsolution/3104159

please tell me why i am getting wrong answer. http://www.codechef.com/viewsolution/3104159