Respuesta :

this is essentially the game mastermind if you want to look up more about it

the first 2 guesses have a number with the correct value and in the right position "bulls", all three guesses start with a 1, so if 1 were correct in the first position the 3rd guess would have a "bull" too

this means either the 6 or 2 from the first guess and the 7 or 5 from the second are correct in the 2nd or 3rd position

in the 3rd guess the 3rd number is a 5 without a "bull" so the 5 in the 2nd guess can't also be the "bull". Because 1 and 5 can't possibly be bulls the only number left is 7 so the code is _7_

Because of this we also know that in the first guess the 2 must be the "bull", as in the second spot only a 7 would be correct and the 1 is incorrect anyways -> the code is _72

"Cows"=right number at wrong position only appeared in the guesses 2 and 3 and we know it's neither the numbers 1 (because of guess 1), 7 (becuse it is a bull in 2) and 6 (because it is only in 3 and not both 2 and 3) -> the only number in guess 2 and 3 left is 5

-> the code is 572