- 题解
aabb平方数
- @ 2026-3-12 11:26:48
#include<bits/stdc++.h> #include using namespace std; int main(){ int n,t;
for(int i=1;i<=9;i++){
for(int b=0;b<=9;b++){
n=i*1100+b*11;
t=(int)sqrt(n);
if(t*t==n){
cout<<n<<endl;
}
}
}
return 0;
}
#include<bits/stdc++.h> #include using namespace std; int main(){ int n,t;
for(int i=1;i<=9;i++){
for(int b=0;b<=9;b++){
n=i*1100+b*11;
t=(int)sqrt(n);
if(t*t==n){
cout<<n<<endl;
}
}
}
return 0;
}