回文数算法2
#include
#include
#include
#include
using namespace std;
int main(){
char s1[10000],s2[10000];
int n,m,b;
cin>>n;
for(int i=1;i<=300;i++){
_itoa(i*i,s1,n);
_itoa(i,s2,n);
m=strlen(s1);
b=0;
for(int j=0;j<m/2;j++)
if(s1[j]!=s1[m-1-j])
b=-1;
if(b==0)
cout<<s2<<" "<<s1<<endl;
}
}