永发信息网

请各位一定要帮忙!!求求各位了````

答案:2  悬赏:70  手机版
解决时间 2021-11-17 12:01
请各位一定要帮忙!!求求各位了````
最佳答案
这都知道。。。。一个学校的????
我给你做吧 等等
你姐姐阿 呵呵 大几阿 呵呵 我用的是c 我电脑没安vc++ 你姐姐应该会改吧?
c代码如下:
#include

typedef struct aa
{
int snx;
int sny;
int snz;
int h;
struct aa *next;
struct aa *qian;
}zhizhen;

int main()
{
int nx,ny,nz,min,pd=0;
zhizhen *p,*head,*q,*x;

p = (zhizhen *)malloc(sizeof(zhizhen));
p->h = 100;
p->next = NULL;
p->qian = NULL;
head = p;

for(nx=1; nx<8; nx++)
{
for(ny=1; ny<8; ny++)
{
for(nz=1; nz<8; nz++)
{
if(nx*nx+ny*ny+nz*nz <= 60)
{
q = (zhizhen *)malloc(sizeof(zhizhen));
if(q == NULL)
{
printf("申请空间错误 程序错误!\n");
getch();
return(-1);
}
q->snx = nx;
q->sny = ny;
q->snz = nz;
q->h = nx*nx+ny*ny+nz*nz;
q->next = NULL;
q->qian = p;
p->next = q;
p = q;
}
}
}
}

p = head;
while(head->next != NULL)
{
min = p->h;
x = p;
while(p->next != NULL)
{
if(p->h < min)
{
min = p->h;
x = p;
}
p = p->next;
}
if(head != x)
{
printf("nx = %d\tny = %d\tnz = %d\tx^2+y^2+z^2 = %d\n",x->snx,x->sny,x->snz,x->h);
p = head;
x->qian->next = x->next;
if(x->next != NULL)
{
x->next->qian = x->qian;
}
free(x);
}
}
getch();
return(0);
}
如果要结果我直接贴给你 结果如下:

nx = 1 ny = 1 nz = 1 x^2+y^2+z^2 = 3
nx = 1 ny = 1 nz = 2 x^2+y^2+z^2 = 6
nx = 1 ny = 2 nz = 1 x^2+y^2+z^2 = 6
nx = 2 ny = 1 nz = 1 x^2+y^2+z^2 = 6
nx = 1 ny = 2 nz = 2 x^2+y^2+z^2 = 9
nx = 2 ny = 1 nz = 2 x^2+y^2+z^2 = 9
nx = 2 ny = 2 nz = 1 x^2+y^2+z^2 = 9
nx = 1 ny = 1 nz = 3 x^2+y^2+z^2 = 11
nx = 1 ny = 3 nz = 1 x^2+y^2+z^2 = 11
nx = 3 ny = 1 nz = 1 x^2+y^2+z^2 = 11
nx = 2 ny = 2 nz = 2 x^2+y^2+z^2 = 12
nx = 1 ny = 2 nz = 3 x^2+y^2+z^2 = 14
nx = 1 ny = 3 nz = 2 x^2+y^2+z^2 = 14
nx = 2 ny = 1 nz = 3 x^2+y^2+z^2 = 14
nx = 2 ny = 3 nz = 1 x^2+y^2+z^2 = 14
nx = 3 ny = 1 nz = 2 x^2+y^2+z^2 = 14
nx = 3 ny = 2 nz = 1 x^2+y^2+z^2 = 14
nx = 2 ny = 2 nz = 3 x^2+y^2+z^2 = 17
nx = 2 ny = 3 nz = 2 x^2+y^2+z^2 = 17
nx = 3 ny = 2 nz = 2 x^2+y^2+z^2 = 17
nx = 1 ny = 1 nz = 4 x^2+y^2+z^2 = 18
nx = 1 ny = 4 nz = 1 x^2+y^2+z^2 = 18
nx = 4 ny = 1 nz = 1 x^2+y^2+z^2 = 18
nx = 1 ny = 3 nz = 3 x^2+y^2+z^2 = 19
nx = 3 ny = 1 nz = 3 x^2+y^2+z^2 = 19
nx = 3 ny = 3 nz = 1 x^2+y^2+z^2 = 19
nx = 1 ny = 2 nz = 4 x^2+y^2+z^2 = 21
nx = 1 ny = 4 nz = 2 x^2+y^2+z^2 = 21
nx = 2 ny = 1 nz = 4 x^2+y^2+z^2 = 21
nx = 2 ny = 4 nz = 1 x^2+y^2+z^2 = 21
nx = 4 ny = 1 nz = 2 x^2+y^2+z^2 = 21
nx = 4 ny = 2 nz = 1 x^2+y^2+z^2 = 21
nx = 2 ny = 3 nz = 3 x^2+y^2+z^2 = 22
nx = 3 ny = 2 nz = 3 x^2+y^2+z^2 = 22
nx = 3 ny = 3 nz = 2 x^2+y^2+z^2 = 22
nx = 2 ny = 2 nz = 4 x^2+y^2+z^2 = 24
nx = 2 ny = 4 nz = 2 x^2+y^2+z^2 = 24
nx = 4 ny = 2 nz = 2 x^2+y^2+z^2 = 24
nx = 1 ny = 3 nz = 4 x^2+y^2+z^2 = 26
nx = 1 ny = 4 nz = 3 x^2+y^2+z^2 = 26
nx = 3 ny = 1 nz = 4 x^2+y^2+z^2 = 26
nx = 3 ny = 4 nz = 1 x^2+y^2+z^2 = 26
nx = 4 ny = 1 nz = 3 x^2+y^2+z^2 = 26
nx = 4 ny = 3 nz = 1 x^2+y^2+z^2 = 26
nx = 1 ny = 1 nz = 5 x^2+y^2+z^2 = 27
nx = 1 ny = 5 nz = 1 x^2+y^2+z^2 = 27
nx = 3 ny = 3 nz = 3 x^2+y^2+z^2 = 27
nx = 5 ny = 1 nz = 1 x^2+y^2+z^2 = 27
nx = 2 ny = 3 nz = 4 x^2+y^2+z^2 = 29
nx = 2 ny = 4 nz = 3 x^2+y^2+z^2 = 29
nx = 3 ny = 2 nz = 4 x^2+y^2+z^2 = 29
nx = 3 ny = 4 nz = 2 x^2+y^2+z^2 = 29
nx = 4 ny = 2 nz = 3 x^2+y^2+z^2 = 29
nx = 4 ny = 3 nz = 2 x^2+y^2+z^2 = 29
nx = 1 ny = 2 nz = 5 x^2+y^2+z^2 = 30
nx = 1 ny = 5 nz = 2 x^2+y^2+z^2 = 30
nx = 2 ny = 1 nz = 5 x^2+y^2+z^2 = 30
nx = 2 ny = 5 nz = 1 x^2+y^2+z^2 = 30
nx = 5 ny = 1 nz = 2 x^2+y^2+z^2 = 30
nx = 5 ny = 2 nz = 1 x^2+y^2+z^2 = 30
nx = 1 ny = 4 nz = 4 x^2+y^2+z^2 = 33
nx = 2 ny = 2 nz = 5 x^2+y^2+z^2 = 33
nx = 2 ny = 5 nz = 2 x^2+y^2+z^2 = 33
nx = 4 ny = 1 nz = 4 x^2+y^2+z^2 = 33
nx = 4 ny = 4 nz = 1 x^2+y^2+z^2 = 33
nx = 5 ny = 2 nz = 2 x^2+y^2+z^2 = 33
nx = 3 ny = 3 nz = 4 x^2+y^2+z^2 = 34
nx = 3 ny = 4 nz = 3 x^2+y^2+z^2 = 34
nx = 4 ny = 3 nz = 3 x^2+y^2+z^2 = 34
nx = 1 ny = 3 nz = 5 x^2+y^2+z^2 = 35
nx = 1 ny = 5 nz = 3 x^2+y^2+z^2 = 35
nx = 3 ny = 1 nz = 5 x^2+y^2+z^2 = 35
nx = 3 ny = 5 nz = 1 x^2+y^2+z^2 = 35
nx = 5 ny = 1 nz = 3 x^2+y^2+z^2 = 35
nx = 5 ny = 3 nz = 1 x^2+y^2+z^2 = 35
nx = 2 ny = 4 nz = 4 x^2+y^2+z^2 = 36
nx = 4 ny = 2 nz = 4 x^2+y^2+z^2 = 36
nx = 4 ny = 4 nz = 2 x^2+y^2+z^2 = 36
nx = 1 ny = 1 nz = 6 x^2+y^2+z^2 = 38
nx = 1 ny = 6 nz = 1 x^2+y^2+z^2 = 38
nx = 2 ny = 3 nz = 5 x^2+y^2+z^2 = 38
nx = 2 ny = 5 nz = 3 x^2+y^2+z^2 = 38
nx = 3 ny = 2 nz = 5 x^2+y^2+z^2 = 38
nx = 3 ny = 5 nz = 2 x^2+y^2+z^2 = 38
nx = 5 ny = 2 nz = 3 x^2+y^2+z^2 = 38
nx = 5 ny = 3 nz = 2 x^2+y^2+z^2 = 38
nx = 6 ny = 1 nz = 1 x^2+y^2+z^2 = 38
nx = 1 ny = 2 nz = 6 x^2+y^2+z^2 = 41
nx = 1 ny = 6 nz = 2 x^2+y^2+z^2 = 41
nx = 2 ny = 1 nz = 6 x^2+y^2+z^2 = 41
nx = 2 ny = 6 nz = 1 x^2+y^2+z^2 = 41
nx = 3 ny = 4 nz = 4 x^2+y^2+z^2 = 41
nx = 4 ny = 3 nz = 4 x^2+y^2+z^2 = 41
nx = 4 ny = 4 nz = 3 x^2+y^2+z^2 = 41
nx = 6 ny = 1 nz = 2 x^2+y^2+z^2 = 41
nx = 6 ny = 2 nz = 1 x^2+y^2+z^2 = 41
nx = 1 ny = 4 nz = 5 x^2+y^2+z^2 = 42
nx = 1 ny = 5 nz = 4 x^2+y^2+z^2 = 42
nx = 4 ny = 1 nz = 5 x^2+y^2+z^2 = 42
nx = 4 ny = 5 nz = 1 x^2+y^2+z^2 = 42
nx = 5 ny = 1 nz = 4 x^2+y^2+z^2 = 42
nx = 5 ny = 4 nz = 1 x^2+y^2+z^2 = 42
nx = 3 ny = 3 nz = 5 x^2+y^2+z^2 = 43
nx = 3 ny = 5 nz = 3 x^2+y^2+z^2 = 43
nx = 5 ny = 3 nz = 3 x^2+y^2+z^2 = 43
nx = 2 ny = 2 nz = 6 x^2+y^2+z^2 = 44
nx = 2 ny = 6 nz = 2 x^2+y^2+z^2 = 44
nx = 6 ny = 2 nz = 2 x^2+y^2+z^2 = 44
nx = 2 ny = 4 nz = 5 x^2+y^2+z^2 = 45
nx = 2 ny = 5 nz = 4 x^2+y^2+z^2 = 45
nx = 4 ny = 2 nz = 5 x^2+y^2+z^2 = 45
nx = 4 ny = 5 nz = 2 x^2+y^2+z^2 = 45
nx = 5 ny = 2 nz = 4 x^2+y^2+z^2 = 45
nx = 5 ny = 4 nz = 2 x^2+y^2+z^2 = 45
nx = 1 ny = 3 nz = 6 x^2+y^2+z^2 = 46
nx = 1 ny = 6 nz = 3 x^2+y^2+z^2 = 46
nx = 3 ny = 1 nz = 6 x^2+y^2+z^2 = 46
nx = 3 ny = 6 nz = 1 x^2+y^2+z^2 = 46
nx = 6 ny = 1 nz = 3 x^2+y^2+z^2 = 46
nx = 6 ny = 3 nz = 1 x^2+y^2+z^2 = 46
nx = 4 ny = 4 nz = 4 x^2+y^2+z^2 = 48
nx = 2 ny = 3 nz = 6 x^2+y^2+z^2 = 49
nx = 2 ny = 6 nz = 3 x^2+y^2+z^2 = 49
nx = 3 ny = 2 nz = 6 x^2+y^2+z^2 = 49
nx = 3 ny = 6 nz = 2 x^2+y^2+z^2 = 49
nx = 6 ny = 2 nz = 3 x^2+y^2+z^2 = 49
nx = 6 ny = 3 nz = 2 x^2+y^2+z^2 = 49
nx = 3 ny = 4 nz = 5 x^2+y^2+z^2 = 50
nx = 3 ny = 5 nz = 4 x^2+y^2+z^2 = 50
nx = 4 ny = 3 nz = 5 x^2+y^2+z^2 = 50
nx = 4 ny = 5 nz = 3 x^2+y^2+z^2 = 50
nx = 5 ny = 3 nz = 4 x^2+y^2+z^2 = 50
nx = 5 ny = 4 nz = 3 x^2+y^2+z^2 = 50
nx = 1 ny = 1 nz = 7 x^2+y^2+z^2 = 51
nx = 1 ny = 5 nz = 5 x^2+y^2+z^2 = 51
nx = 1 ny = 7 nz = 1 x^2+y^2+z^2 = 51
nx = 5 ny = 1 nz = 5 x^2+y^2+z^2 = 51
nx = 5 ny = 5 nz = 1 x^2+y^2+z^2 = 51
nx = 7 ny = 1 nz = 1 x^2+y^2+z^2 = 51
nx = 1 ny = 4 nz = 6 x^2+y^2+z^2 = 53
nx = 1 ny = 6 nz = 4 x^2+y^2+z^2 = 53
nx = 4 ny = 1 nz = 6 x^2+y^2+z^2 = 53
nx = 4 ny = 6 nz = 1 x^2+y^2+z^2 = 53
nx = 6 ny = 1 nz = 4 x^2+y^2+z^2 = 53
nx = 6 ny = 4 nz = 1 x^2+y^2+z^2 = 53
nx = 1 ny = 2 nz = 7 x^2+y^2+z^2 = 54
nx = 1 ny = 7 nz = 2 x^2+y^2+z^2 = 54
nx = 2 ny = 1 nz = 7 x^2+y^2+z^2 = 54
nx = 2 ny = 5 nz = 5 x^2+y^2+z^2 = 54
nx = 2 ny = 7 nz = 1 x^2+y^2+z^2 = 54
nx = 3 ny = 3 nz = 6 x^2+y^2+z^2 = 54
nx = 3 ny = 6 nz = 3 x^2+y^2+z^2 = 54
nx = 5 ny = 2 nz = 5 x^2+y^2+z^2 = 54
nx = 5 ny = 5 nz = 2 x^2+y^2+z^2 = 54
nx = 6 ny = 3 nz = 3 x^2+y^2+z^2 = 54
nx = 7 ny = 1 nz = 2 x^2+y^2+z^2 = 54
nx = 7 ny = 2 nz = 1 x^2+y^2+z^2 = 54
nx = 2 ny = 4 nz = 6 x^2+y^2+z^2 = 56
nx = 2 ny = 6 nz = 4 x^2+y^2+z^2 = 56
nx = 4 ny = 2 nz = 6 x^2+y^2+z^2 = 56
nx = 4 ny = 6 nz = 2 x^2+y^2+z^2 = 56
nx = 6 ny = 2 nz = 4 x^2+y^2+z^2 = 56
nx = 6 ny = 4 nz = 2 x^2+y^2+z^2 = 56
nx = 2 ny = 2 nz = 7 x^2+y^2+z^2 = 57
nx = 2 ny = 7 nz = 2 x^2+y^2+z^2 = 57
nx = 4 ny = 4 nz = 5 x^2+y^2+z^2 = 57
nx = 4 ny = 5 nz = 4 x^2+y^2+z^2 = 57
nx = 5 ny = 4 nz = 4 x^2+y^2+z^2 = 57
nx = 7 ny = 2 nz = 2 x^2+y^2+z^2 = 57
nx = 1 ny = 3 nz = 7 x^2+y^2+z^2 = 59
nx = 1 ny = 7 nz = 3 x^2+y^2+z^2 = 59
nx = 3 ny = 1 nz = 7 x^2+y^2+z^2 = 59
nx = 3 ny = 5 nz = 5 x^2+y^2+z^2 = 59
nx = 3 ny = 7 nz = 1 x^2+y^2+z^2 = 59
nx = 5 ny = 3 nz = 5 x^2+y^2+z^2 = 59
nx = 5 ny = 5 nz = 3 x^2+y^2+z^2 = 59
nx = 7 ny = 1 nz = 3 x^2+y^2+z^2 = 59
nx = 7 ny = 3 nz = 1 x^2+y^2+z^2 = 59
全部回答
中科大 ...

计算机专业的么 ...
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
想在南溪办婚礼,有没有好的酒店,或者新修的
为什么有时故意和我拉关系的人我感觉很恶心?
9米高柱子分2次浇砼中间留洞多大为好?
求姓闫 有木有水五格大吉的好名字(男孩) 有
肉丝酱的做法,茭白毛豆肉丝酱怎么做好吃
采用定额成本法计算月末在产品定额成本,和完
5 安装门头雇4个工人能在三天内安好吗?着急
厦门人为什么那么势利眼?
大浪到最后有没有把石头穿滴?
无棣离沾化多远
关于物业承包骗局
学校的办学规模是指的什么
厨卫地址有知道的么?有点事想过去!
我想买车在我们县城一样的车就比在省城贵几千
少年闰土中的重点词的意思
推荐资讯
一个女孩16岁,没有人喜欢自己,说明什么,是
有没有一部小说。男主角是很萌很萌的少年。
如果真心能换来真心,世上就不会有那么多
“需要参加何种英语考试。每学期的学费是多少
在面试学生部门时,不小心把部门说成社团了怎
中科大是啥
乌鲁木齐的二手车市场在哪
为何勇士招募球员会引来各种的谩骂不满?
卖袜子应该赠送什么东西好呢!
林丹轮胎经营部地址在哪,我要去那里办事,
天能维护电池一般能用多久
余干宾馆停车场地址好找么,我有些事要过去,
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?