拼图算法 [英] Algorithm for a puzzle

查看:186
本文介绍了拼图算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户输入3位或4位数字 - X.

我需要+ b + c = X其中,

a,b,c是3位数字,所有数字在所有9位数字中都是唯一的。那是a,b,c在任何位置都没有任何重复数字。



我需要所有可能的'X'组合/解决方案。这就是所有可能的a + b + c组合。



建议我算法或逻辑相同的asap。

User enters 3 or 4 digit number say - X.
I need a+b+c=X where,
a,b,c are 3 digit numbers and all digits are unique among all 9 digits. That is a,b,c does not have any repetitive digit on any position.

I need all possible combinations/solutions for 'X'. That is all possible a+b+c combinations.

Suggest me algorithm or logic for the same asap.

推荐答案

试试这个 wiki文章 [ ^ ]作为起点
Try this wiki article[^] as a starting point


我们不做你的作业:它是有原因设置的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



如果遇到具体问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!



顺便说一下:要求那些你想要免费帮助的人应该做的事情asap不是结交朋友的好方法 - 或者根本不为你完成任何事情。
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

And by the way: demanding that people you want free help from should do things "asap" is not a good way to make friends - or get anything done for you at all.


这篇关于拼图算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆