/* ID:twd30651 PROG:palsquare LANG:C++ */ #include<iostream> #include<fstream> #include<stdlib.h> #include<string.h> using namespace std; int BASE; char B[]={'0','1','2','3','4','5','6','7','8','9', 'A','B','C','D','E','F','G','H','I','J'}; int isPalindrome(char *s,int len) { for(int i=0,j=len-1;i<=j;i++,j--) { if(s[i]!=s[j])return 0; } if(len>0)return 1; else return 0; } void getp(char *s,int num,int b) { int index=0; while(num/b!=0) { s[index++]=B[num%b]; num=num/b; } s[index++]=B[num%b];; s[index]='