That's because those are two separate answers stemming from two separate simulations. One for each of the two possibilities I mentioned:
That 1 1 0 1 0 1 0 X solution is for the latter case, where they can be bought with 1¢. If it's unclear why 1¢ might be enough, i.e., why 1¢ can be considered better than "0¢ or 2¢", imagine you're given this choice:
Option 1) You get 1 billion dollars.
Option 2) You either get 2 billion dollars or nothing (50/50 chance).
Clearly option 1 is far better (unless you have a particular need for more than 1 billion dollars). The expected value is the same, and one billion should be more than you'll ever need. This is an extreme example to make it intuitive, but it's true in general: The first $x are more valuable than the next $x because a fixed amount of money gets less important the more money you already have.