3 ms·
Both methods are fine. Let's say you press the Random button first. If it is actually the Coke button, you get a Coke, and you can stop. Otherwise it's actuall
by Arnavion 5y ago
Both methods are fine.
Let's say you press the Random button first. If it is actually the Coke button, you get a Coke, and you can stop. Otherwise it's actually the Pepsi button, then you press the Pepsi button since that is actually the Coke button. So you get a Coke in one or two button presses.
Basically there are only two permutations of buttons possible, because all other permutations are disqualified by the "not the same as before" rule. Since the goal is specifically to get a Coke in the fewest button presses, you just have to not start with the Coke button since that is the least likely to produce a Coke.