怎么求解N*N的方格组成多少个正方形?rt[解决办法]推下公式:n=NScale是边长Scale = 1; (n-1 + 1) * (n - 1 + 1) Scale = 2; (n-2 + 1) * (n - 2 + 1)...Scale = n; (n-n + 1) * (n - n + 1)因此:int iSum = 0;for (int i = 0; i < nSize; i++){ iSum += (nSize- i) * (nSize - i)}