- #1
Wilmer
- 307
- 0
This reminds me of the old mastermind puzzle.
Computer picks (at random) a 4-digit number.
The number will contain only the digits 1, 2, 3, and 4:
the digits may be used more than once: 1111 to 4444.
You input a guess as to what the number is.
If your guess has at least 3 digits in their correct positions, you
will be told so by the computer; else you will be told "try again!"
Example: computer's number is 2334; you enter 2314:
3 digits are in correct position: 23-4, 23-4
Of course if you entered 2334, you would also get the message.
What is the minimum number of numbers you need to enter
before you get the "correct 3 positions" message?
Any hints?
I'm having fun trying to solve that...
Computer picks (at random) a 4-digit number.
The number will contain only the digits 1, 2, 3, and 4:
the digits may be used more than once: 1111 to 4444.
You input a guess as to what the number is.
If your guess has at least 3 digits in their correct positions, you
will be told so by the computer; else you will be told "try again!"
Example: computer's number is 2334; you enter 2314:
3 digits are in correct position: 23-4, 23-4
Of course if you entered 2334, you would also get the message.
What is the minimum number of numbers you need to enter
before you get the "correct 3 positions" message?
Any hints?
I'm having fun trying to solve that...