I am trying to solve this question PALIN
I am getting WA for this code but I tried it with more than 50 test cases. Please help
#include<iostream>
#include<string.h>
using namespace std;
string me;
string b;
int push(long n, int l){
long r = n,m=0;
int d,oo=1;
for(int i=0; i<l; i++)
oo*=10;
oo=oo/10;
for(int i=0; i<l; i++){
m= m + ((n%10)*oo);
oo/=10;
n=n/10;
}
if(r==m){
cout<<r<<endl;
return 0;
}
n=r+1;
int len=0;
while(n!=0){
len = len +1;
n = n/10;
}
push(r+1,len);
}
int main(){
int t;
cin>>t;
while(t--){
long n;
cin>>n;
int c = n+1, len=0;
while(c!=0){
len = len +1;
c = c/10;
}
push(n+1, len);
}
}