#include <iostream> using namespace std; bool isSymmetry (int n){ int a = 0, b = 0, x = n; while (n != 0){ a = n % 10; b = b * 10 + a; n /= 10; } return x == b; } int main () { for (int i = 1; i <= 256; i++){ if (isSymmetry(i * i)){ cout << i << endl; } } return 0; }