#include <iostream>
using namespace std;
const int N=65540;
int a[N];
bool is_balance(int t){
int index=0;
while(t){
a[index++]=t%10;
t/=10;
}
for(int i=0,j=index-1;i<j;i++,j--){
if(a[i]!=a[j]) return false;
}
return true;
}
int main() {
for(int i=0;i<=256;i++){
int t=i*i;
if(is_balance(t)) cout<<i<<endl;
}
return 0;
}

京公网安备 11010502036488号