#include #include #include using namespace std; static int baseb=10,countb=0; bool palin(int);int base(int,int); int main() { int n,s,count=0; cin>>n;cin>>s; //check for palindromes from s onwards for(int i=s;i<10000;i++) { if(count==n) return(0); countb=0; if(palin(i)) { cout<=2;i--) { bool x;baseb=i; x=palin(base(no,i)); } } return(false); } int base(int no,int i) { string temp; int ret;char x; while(no!=0) { x=no%i+'0'; temp=temp+x; no=no/i; } reverse(temp.begin(),temp.end()); sscanf(temp.c_str(),"%d",&ret); return(ret); }