LANGyang系列 ~~ sweets 链接:click here 时间限制: 1000 ms | 内存限制: 65535 KB 难度: 1 描述 The president of LanXiang buys N packets of sweets for his students.However, the number of sweets i
1105. Spiral Matrix (25) 题目信息 This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the first element at the
题目链接https://pintia.cn/problem-sets/994805342720868352/problems/994805363117768704 题目大意,给出一串序列,要求将其按顺时针顺序填入一个m*n的矩阵中,其中m>n且m-n最小。 简单题,只需要注意顺时针这个顺序即可。先求m和n。 m = (int)(sqrt(1.0*N));while (N % m !=