Ranter
Join devRant
Do all the things like
++ or  rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power realtime personalized recommendations and activity feeds using a simple API
Learn More
Comments

junon286738d42 is the answer to life, the universe, and everything, of course.
Also I wrote some C. https://gist.github.com/Qix/... 
We used to play this game in high school.
You'd decide a codeword. Could be alphanumeric.
The guesser would randomly give an example codeword to test out.
You'd say 'n'P and 'm'C, where 'n' denoted the number of correct letters at wrong position and 'm' denoted number of correct letters in right place.
Your goal was to minimize the guesses taken.
Good mix of raw luck and strategy.
Surprisingly, someone guessed "ASSPH@TT" in less than 8 tries. It was quite a revered record. 
dfanelli72238d042 SPOILER
Bottom right: 0 is the only correct one as 7 and 8 are wrong. But it’s in the wrong index. It can’t be in the right index.
Top right: 0 is one of the correct numbers and the other is either 2 or 6. But again it’s in the wrong slot, the middle slot so it belongs in the leftmost slot. We know it can’t be in the right slot as mentioned.
And the top left and middle say one number is right, but it can’t be the 6 bc the top left says one number is right and in the right slot and the top center says one number is right and in the wrong slot. If 6 is right, there would be a contradiction bc it would be simultaneously in the right and wrong slot. So in the top left pic, since we know 6 and 8 are wrong, the only right mum is 2 and it’s in the right position. So 0 in the first pos, 2 in the last pos. 
dfanelli72238dContinued...
For the middle pos, looking at top center pic,1 can’t be right bc the other two slots (first and last) are occupied by 0 and 2 in the answer. 1 can’t be right since it would be in both the correct and incorrect position, a contradiction. So that leaves 4 as the correct number out of position and it belongs in the middle 
hack491038dHint 5; correct number is 0 because 7 and 8 is not correct according to hint 4. Also its not last digit of answer.
Hint 3; we know 0 is one of correct numbers and correct place is first digit because its wrongly placed on this hint. So answer starts with 0.
Hint 1; 8 cannot be correct number according to hint 4 and as we know first digit is 0, 6 cannot be correct either. So 2 is the correct number and its last digit of answer. So answer is something like 0X2.
Hint 3; 0 and 2 is correct but wrongly placed digits so 6 shouldn't be in our answer. So we eliminate 6 from hint 2.
Hint 2; we are missing second digit of answer and it cannot be 1 because hint says its wrongly placed. 4 is wrongly placed on last digit. So second digit of answer is 4 and code is 042 
hjk101293138dI started with XX2 because that is the most obvious one and correct place after eliminating 6 and using hint 3.
Than 0 is the other known number now and it has to be here 0X2. Hint 2 has nr 1 in the right spot so 4 has to be there: 042.
Really nicely designed puzzle! 
Hazarth195438d042, this was kinda fun
I first reduced the searchspace by using all the unique numbers  numbers in rule 4:
0, 1, 2, 4, 6, 8
After that I iterated over all the rules to find most obvious discrepencies:
from rule1 > rule2:
I can tell It's not 6 because r1 states the number is already placed but r2 has 6 in the same pos
So: 0, 1, 2, 4, 8
r3 tells me that two correct numbers are 2 and 0, I already know 6 is wrong, and rule1 tells me that 2 is already placed and 8 isn't it:
0, 1, 2, 4 => [x, x, 2]
from r2 I already know It's not 6, and I know only 1 OR 4 can be correct, and only one of them I know for sure is wrongly placed (i know where 2 is)
This means my numbers are:
0, 2, 4 => [x, x, 2]
Lastly r3 tells me that 0 is not in the middle position, and right position is already taken by 2... So only one spot left and it all falls in place
0, 2, 4 => [0, 4, 2] 
The Correct Answer:
Tie up the owner of the lock and threaten them with a baseball bat. 
A> "one number is correct, well placed: 682
B> "one number is correct but wrongly placed: 614
C> "Two numbers are correct, but wrongly placed": 206
D> "nothing is correct": 738
E> "One number is correct but wrongly placed": 780
Assuming digits cannot be reused:
F> 6 cannot be in the code due to a contradiction in A + B.
G> 6 already has been ruled out in F, leaving 2 and 0 at C.
H> E confirms the 0 we found in G must be in the code.
I> 0 cannot be in the last digit, nor the middle digit due to E and C so, 0 must be the first digit.
J> D rules out the possibility of 8, confirming the existence of 2 in the code at G.
K> F denies the possibility of 6, D rules out the possibilty of 8. A must be 2 as the last digit.
L> F denies the possibility of 6, B tells us that the last digit is wrongly placed but in the set. I tells us the first digit is 0, K tells us the last digit is 2, leaving only the middle digit, ruling out 1 and leaving 4.
Final solution must be 042. 
@JustThat Love that game, still playing it to this date a lot with my parents (spoiler alert: they aren't great masterminds)

Wisecrack476038dstart w/ digits: 68214073
box 738. all wrong and incorrect positions. eliminate 738.
remaining: 62140
box 780, one number correct but wrongly placed. 7 and 8 are eliminated. 0 is correct. 0s possible cells: 1 or 2
box 682, 8 is eliminated. either 6 or 2 is correct.
box 206, 2 correct numbers wrongly placed. 0 is a correct number. 0 can only be in cells 1 or 2. 0 is therefore wrongly placed. cell 1 is 0.
box 682, cell 1 is eliminated by 0, 8 is eliminated. therefore 2 is correct and well placed. cell 3 is 2.
box 614, one number correct but wrongly placed. cells 1 and 3 are gone, leaving only 6 and 4 for cell 2.
box 682. one number is well placed *and correct*. 6 and 8 already eliminated. so 6 cannot be in cell 2.
answer: 042
Crack the code?
question