34568加减乘除等于8用什么方法
3个回答
展开全部
用一个递归函数枚举即可. 部分结果:
[1176] 8+3-(4+5)+6;
[1177] 8-3+4+5-6;
[1178] 8+3-4-5+6;
[1179] 8-(3-4)+5-6;
[1180] 8+3-4-5+6;
[1181] 8-3+4+5-6;
[1182] (8/3+4)/5*6;
[1183] 6+8-(5+4-3);
[1184] 6*8/(5+4-3);
[1185] 6+8/(5-(4-3));
[1186] 6+8-(5+4-3);
[1187] 6*8/(5+4-3);
[1188] 6+8/(5-4+3);
[1189] 6+8-5-(4-3);
[1190] 6+8-(5+4)+3;
[1191] 6+8-5-4+3;
[1192] 6+8-(5+4-3);
[1193] 6+8-(5+4-3);
[1194] 6*8/(5+4-3);
[1195] 6*8/(5+4-3);
[1196] 6+8-5-(4-3);
[1176] 8+3-(4+5)+6;
[1177] 8-3+4+5-6;
[1178] 8+3-4-5+6;
[1179] 8-(3-4)+5-6;
[1180] 8+3-4-5+6;
[1181] 8-3+4+5-6;
[1182] (8/3+4)/5*6;
[1183] 6+8-(5+4-3);
[1184] 6*8/(5+4-3);
[1185] 6+8/(5-(4-3));
[1186] 6+8-(5+4-3);
[1187] 6*8/(5+4-3);
[1188] 6+8/(5-4+3);
[1189] 6+8-5-(4-3);
[1190] 6+8-(5+4)+3;
[1191] 6+8-5-4+3;
[1192] 6+8-(5+4-3);
[1193] 6+8-(5+4-3);
[1194] 6*8/(5+4-3);
[1195] 6*8/(5+4-3);
[1196] 6+8-5-(4-3);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询