Problem #PRU-65867

Problems Set theory and logic Algorithm Theory Algorithm Theory

Problem

One hundred cubs found berries in the forest: the youngest managed to grab 1 berry, the next youngest cub – 2 berries, the next – 4 berries, and so on, until the oldest who got \(2^{99}\) berries. The fox suggested that they share the berries “fairly.” She can approach two cubs and distribute their berries evenly between them, and if this leaves an extra berry, then the fox eats it. With such actions, she continues, until all the cubs have an equal number of berries. What is the largest number of berries that the fox can eat?