5个5只能用加减乘除,不能用括号,怎样才能等于0
2个回答
展开全部
不用括号的话,5个5之间四个位置只能是加减乘除,一共有4*4*4*4 = 256种情况。用MATLAB编程遍历了一下,不可能等于0.MATLAB代码如下:
dFF = fullfact(4*ones(1,4));
str = '+-*/';
allStr = str(dFF);
express = repmat('5 5 5 5 5',256,1);
express(:,2:2:8) = allStr;
for k = 1:256
disp([express(k,:),' = ',num2str(eval(express(k,:)))]);
end
结果如下:
5+5+5+5+5 = 25
5-5+5+5+5 = 15
5*5+5+5+5 = 40
5/5+5+5+5 = 16
5+5-5+5+5 = 15
5-5-5+5+5 = 5
5*5-5+5+5 = 30
5/5-5+5+5 = 6
5+5*5+5+5 = 40
5-5*5+5+5 = -10
5*5*5+5+5 = 135
5/5*5+5+5 = 15
5+5/5+5+5 = 16
5-5/5+5+5 = 14
5*5/5+5+5 = 15
5/5/5+5+5 = 10.2
5+5+5-5+5 = 15
5-5+5-5+5 = 5
5*5+5-5+5 = 30
5/5+5-5+5 = 6
5+5-5-5+5 = 5
5-5-5-5+5 = -5
5*5-5-5+5 = 20
5/5-5-5+5 = -4
5+5*5-5+5 = 30
5-5*5-5+5 = -20
5*5*5-5+5 = 125
5/5*5-5+5 = 5
5+5/5-5+5 = 6
5-5/5-5+5 = 4
5*5/5-5+5 = 5
5/5/5-5+5 = 0.2
5+5+5*5+5 = 40
5-5+5*5+5 = 30
5*5+5*5+5 = 55
5/5+5*5+5 = 31
5+5-5*5+5 = -10
5-5-5*5+5 = -20
5*5-5*5+5 = 5
5/5-5*5+5 = -19
5+5*5*5+5 = 135
5-5*5*5+5 = -115
5*5*5*5+5 = 630
5/5*5*5+5 = 30
5+5/5*5+5 = 15
5-5/5*5+5 = 5
5*5/5*5+5 = 30
5/5/5*5+5 = 6
5+5+5/5+5 = 16
5-5+5/5+5 = 6
5*5+5/5+5 = 31
5/5+5/5+5 = 7
5+5-5/5+5 = 14
5-5-5/5+5 = 4
5*5-5/5+5 = 29
5/5-5/5+5 = 5
5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= 31
5-5*5+5/5 = -19
5*5*5+5/5 = 126
5/5*5+5/5 = 6
5+5/5+5/5 = 7
5-5/5+5/5 = 5
5*5/5+5/5 = 6
5/5/5+5/5 = 1.2
5+5+5-5/5 = 14
5-5+5-5/5 = 4
5*5+5-5/5 = 29
5/5+5-5/5 = 5
5+5-5-5/5 = 4
5-5-5-5/5 = -6
5*5-5-5/5 = 19
5/5-5-5/5 = -5
5+5*5-5/5 = 29
5-5*5-5/5 = -21
5*5*5-5/5 = 124
5/5*5-5/5 = 4
5+5/5-5/5 = 5
5-5/5-5/5 = 3
5*5/5-5/5 = 4
5/5/5-5/5 = -0.8
5+5+5*5/5 = 15
5-5+5*5/5 = 5
5*5+5*5/5 = 30
5/5+5*5/5 = 6
5+5-5*5/5 = 5
5-5-5*5/5 = -5
5*5-5*5/5 = 20
5/5-5*5/5 = -4
5+5*5*5/5 = 30
5-5*5*5/5 = -20
5*5*5*5/5 = 125
5/5*5*5/5 = 5
5+5/5*5/5 = 6
5-5/5*5/5 = 4
5*5/5*5/5 = 5
5/5/5*5/5 = 0.2
5+5+5/5/5 = 10.2
5-5+5/5/5 = 0.2
5*5+5/5/5 = 25.2
5/5+5/5/5 = 1.2
5+5-5/5/5 = 9.8
5-5-5/5/5 = -0.2
5*5-5/5/5 = 24.8
5/5-5/5/5 = 0.8
5+5*5/5/5 = 6
5-5*5/5/5 = 4
5*5*5/5/5 = 5
5/5*5/5/5 = 0.2
5+5/5/5/5 = 5.04
5-5/5/5/5 = 4.96
5*5/5/5/5 = 0.2
5/5/5/5/5 = 0.008
dFF = fullfact(4*ones(1,4));
str = '+-*/';
allStr = str(dFF);
express = repmat('5 5 5 5 5',256,1);
express(:,2:2:8) = allStr;
for k = 1:256
disp([express(k,:),' = ',num2str(eval(express(k,:)))]);
end
结果如下:
5+5+5+5+5 = 25
5-5+5+5+5 = 15
5*5+5+5+5 = 40
5/5+5+5+5 = 16
5+5-5+5+5 = 15
5-5-5+5+5 = 5
5*5-5+5+5 = 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+5+5*5/5 = 15
5-5+5*5/5 = 5
5*5+5*5/5 = 30
5/5+5*5/5 = 6
5+5-5*5/5 = 5
5-5-5*5/5 = -5
5*5-5*5/5 = 20
5/5-5*5/5 = -4
5+5*5*5/5 = 30
5-5*5*5/5 = -20
5*5*5*5/5 = 125
5/5*5*5/5 = 5
5+5/5*5/5 = 6
5-5/5*5/5 = 4
5*5/5*5/5 = 5
5/5/5*5/5 = 0.2
5+5+5/5/5 = 10.2
5-5+5/5/5 = 0.2
5*5+5/5/5 = 25.2
5/5+5/5/5 = 1.2
5+5-5/5/5 = 9.8
5-5-5/5/5 = -0.2
5*5-5/5/5 = 24.8
5/5-5/5/5 = 0.8
5+5*5/5/5 = 6
5-5*5/5/5 = 4
5*5*5/5/5 = 5
5/5*5/5/5 = 0.2
5+5/5/5/5 = 5.04
5-5/5/5/5 = 4.96
5*5/5/5/5 = 0.2
5/5/5/5/5 = 0.008
2011-07-27
展开全部
√5×√5+5-5-5=0
追问
不要根号可以吗?
追答
不可以
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询