一道有趣的数学竞赛题
Sums of Square Numbershttp://www.puzzleup.com/2010/img/puzzle/2010/03.jpgWhich is the smallest number that can be expressed as the sum of six different square numbers, but cannot be expressed as the sum of five different square numbers?那个图片看不到啊,怎么回事啊?有关系吗?还有数字有什么要求吗?
没有关系,就是让你找一个最小数,可以表示成六个不同数的平方和,而不能拿表示成五个不同数的平方和 规定是整数吗? 写了个小程序!解得:55
model:
sets:
shux/1..6/:x;
shuy/1..5/:y;
endsets
min=@sum(shux:x*x);
@for(shux(I) |I#NE#6:x(I)>=x(I+1)+1);
@for(shuy(J) |J#NE#5:y(J)>=y(J+1)+1);
@sum(shux:x*x)+1<=@sum(shuy:y*y);
@for(shux:@gin(x));
@for(shuy:@gin(y)); 签到………祝大家健康快乐到永远! 5#不对呀,你想从一到六的平方和是多少?至少要大于他吧 额?这个题,太那个了吧,有必要吗 试试运气啦~~~~~~~~~~~ 不错不错,我喜欢看