#include <iostream>
#include <cmath>
/*输出所有形如aabb的4位完全平方数(即前两位数字相等,后两位数字相等)*/
/*求平方根,看是否为整数,即用一个int型变量m存储sqrt(n)四舍五入后的整数,然后判断m平方是否等于n*/
using namespace std;

int main()
{
	for (int i = 1; i < 10; ++i)
	{
		for (int j = 1; j < 10; ++j)
		{
			int a = i * 1100 + j * 11;
			int m = floor(sqrt(a) + 0.5);//浮点运算存在误差所以+0.5,floor向下去整,不大于的最大的
			if (m*m == a)
				cout << a << endl;
		}
	}
	return 0;
}

========================================Talk is cheap, show me the code=======================================