4. (7 points) On the board, 48 ones are written. Every minute, Karlson erases two arbitrary numbers and writes their sum on the board, and then eats a number of candies equal to the product of the two erased numbers. What is the maximum number of candies he could have eaten in 48 minutes?
Answer: 1128.

Solution: Let's represent 48 units as points on a plane. Each time we combine numbers, we will connect the points of one group to all the points of the second group with line segments. Note that if we replace numbers $x$ and $y$ with $x+y$, the groups " $x$ " and " $y$ " will be connected by $x y$ line segments. This is the same number of candies that Karlson eats. After 48 minutes, all points will be connected. In total, $\frac{48 \cdot(48-1)}{2}=1128$ line segments will be drawn. Therefore, Karlson will eat 1128 candies.