3. Variant 1. Petya and Masha take candies from a box in turns. Masha took one candy, then Petya took 2 candies, Masha - 3 candies, Petya - 4 candies, and so on. When the number of candies in the box became less than needed for the next turn, all the remaining candies went to the one whose turn it was to take candies. How many candies did Petya get if Masha got 101 candies
Answer: 110.

Solution. Since $1+3+5+7+9+11+13+15+17+19=100101$, then Masha got the last candy. Then Petya took for himself $2+4+6+8+10+12+14+16+18+20=2(1+2+3+4+5+6+7+8+9+10)=110$ candies.