| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 12757 | A班-袁誉晏 | aabb | C++ | 通过 | 100 | 1 MS | 256 KB | 541 | 2025-08-23 11:01:58 |
//输出所有形如aabb的4位完全平方数(即前面两位数字相等,后面两位数字也相等) //a:1~9 //b:0~9 #include<bits/stdc++.h> using namespace std; int c() { int a,b,n,m; for(a=1;a<=9;a++) { for(b=0;b<=9;b++) { n=a*1100+b*11; m=floor(sqrt(n)+0.5);//floor(x+0.5)是为了减少误差 if(m*m==n) { printf("%d\n",n); } } } return 0; } int main() { c(); return 0; }