#include<cstdio>
using namespace std;
int Reverse(int n){
int reverse = 0;
int remain;
while(true){
remain = n%10;
reverse = 10*reverse + remain;
n = n/10;
if(n == 0){
break;
}
}
return reverse;
}
int main(){
int i = 0;
for(i = 0; i <= 256; ++i){
if(i*i == Reverse(i*i)){
printf("%d\n",i);
}
}
}

京公网安备 11010502036488号