Bean removalComputer Science Level 2
A pot contains 75 white beans and 150 black ones. Next to the pot is a large pile of black beans.
A somewhat demented cook removes the beans from the pot, one at a time, according to the following strange rule: He removes two beans from the pot at random. If at least one of the beans is black, he places it on the bean-pile and drops the other bean, no matter what color, back in the pot. If both beans are white, on the other hand, he discards both of them and removes one black bean from the pile and drops it in the pot.
At each turn of this procedure, the pot has one less bean in it. Eventually, just one bean is left in the pot. What color is it?