提交时间:2025-12-27 13:07:18
运行 ID: 78746
#include<bits/stdc++.h> using namespace std; bool a(int m){ int a,b,w=0; int m0=m; while(m0){ w++; m0/=10; } while(m){ a=m%10; m/=10; w-=2; b=m/(10^w); if(a!=b) return 0; } return 1; } int main(){ int s; for(int n=1;n<=256;n++){ s=n*n; if(a(s)) cout<<n<<endl; } return 0; }