Problem

Source: Belarusian National Olympiad 2022

Tags:



Numbers $1,2,\ldots,50$ are written on the board. Anya does the following operation: removes the numbers $a$ and $b$ from the board and writes their sum - $a+b$, after which also notes down the number $ab(a+b)$. After $49$ of this operations only one number was left on the board. Anya summed up all the $49$ numbers in her notes and got $S$. a) Prove that $S$ does not depend on the order of Anya's actions. b) Calculate $S$.