# 5-digit puzzle code looking for solution

Can somebody help me solve this, or can you teach me how?

4 7 2 9 1 - One number is correct but not in right position
9 4 6 8 7 - One number is correct but not in right position
3 1 8 7 2 - Two numbers are correct but only one is in right position
1 5 7 3 9 - Two numbers are correct and both in right position

• Hi, welcome to Puzzling.SE! Where does this puzzle come from? If someone else made it, you need to provide a link back to wherever you found it. – F1Krazy Apr 12 '20 at 11:57
• its a game from my boss dont know where he get it,, so im asking someone to solve it.really got headache solving this – Ayhs Sepsep Apr 12 '20 at 12:06
• we did came up with the same answer.. hope its correct. thank u very much – Ayhs Sepsep Apr 13 '20 at 12:32
• If Oray's answer does turn out to be correct, you can mark it as correct by clicking the green tick mark next to his answer. If it isn't, but your boss tells you the correct solution, you can post that as an answer yourself. – F1Krazy Apr 13 '20 at 12:34
• still waiting for his comment on my answer – Ayhs Sepsep Apr 13 '20 at 12:49

65032

because

I believe your boss' intention was using every digit only once even though it was not given.

Otherwise, there are lots of answers.

How I solved;

Assuming

Every digit needs to be used only once

First two 5 digit numbers (guesses)

have 3 digits in common, so I eliminate them first: $$9$$,$$7$$,$$4$$. The reason is that if we choose any one these digits, we need to eliminate at least 6 numbers directly: $$1$$,$$2$$,$$6$$,$$8$$ and two more numbers among the ones I eliminated. So it should not be the case.

Then

I choose couple from the first wo digit numbers with the left digits, and at the end of trial and error I found the answer after like a minute. (such as {1,8} {1,6}, {2,8}, {2,6}).