Will you crack the code?

Puzzle: Will you crack the code?

Will you crack the code

5 4 8 : One number is correct and well placed.
5 3 0 : Nothing is correct.
1 5 7 : Two numbers are correct but wrong places.
8 0 6 : One number is correct but wrong place.
6 4 7 : One number is correct but wrong place.

To see the answer of this puzzle, please click on any social icons below. Sometime you may need to refresh the page to see them properly.

Answer of the puzzle Will you crack the code? is : 718

First we know that all possible numbers are : 0, 1, 3, 4, 5, 6, 7 and 8

Now from 2nd condition we know that 5, 3 and 0 are not the correct numbers so remaining numbers are : 1, 4, 6, 7 and 8

Now from 3rd condition we know 1 and 7 are included in the code, because 5 is not the possible number anymore. We also know that sequence 1 ? 7, ? 17 and 17? are wrong, so the only possibility is 71? or 7?1 where ? denotes the third number.

Now we need to only choose one number from 4, 6 and 8

From the fourth condition we can only take 8 and 6 because 0 is not possible number.

We can place 8 and 6 in following positions as per our previous conclusion (assume 8 and 6 are the missing number and replace them with question mark 71? and 7?1, all possible combination)

718, 781, 716, 761

Now fourth equation also says that 6 cannot be last digit so our only possible combinations from fourth condition are : 718, 781, and 761

Before coming to fifth condition dont forget that only possible codes are 71? or 7?1
For a moment lets put down all combination using number 6, 4 and 7

716, 761, 714, 741, 717 and 771 (just replace ? with 6, 4 and 7 )

We also had the possible combination of 718, 781, and 761 from fourth condition. Lets put them together and we get following possible codes

716, 761, 714, 741, 717, 771, 718, 781, 761

Now its time to go through the first condition again to get our final code. First condition says 5 4 8 : One number is correct and well placed.

That simply means we need to only choose a number that has 8 (because 4 and 5 are not there in our possible numbers)

First condition also says that number 8 is well placed so it should be last digit. That again means code could be 718 only.