Palindrome Again

Limits 1s, 512 MB

Zain and Zion are best friends. Their favourite game is finding palindromic numbers. But today Zion wanted to make the game more interesting. So he made some rules for the game. The rules are given below:

This is a companion discussion topic for the original entry at

It would be helpful if I could see for which case I’m getting WA :frowning: