Chuk and Gek were decorating the Christmas tree with their mother. To prevent them from fighting, their mother gave each of them the same number of branches and the same number of ornaments. Chuk tried to hang one ornament on each branch, but he was short of one branch. Gek tried to hang two ornaments on each branch, but one branch was left empty. How many branches and how many ornaments do you think their mother gave to the boys?
Problem 806
Official solution
Try to do as Chuk did - hang one toy on each branch.
## Solution
Let's try to do as Chuk did — hang one toy on each branch, then one toy will be left over. Now, let's take two toys — one that is left over, and another one from one of the branches. If we now hang these toys as the second ones on the branches that still have toys from the first time, then on two branches there will be toys and one branch will remain empty. If there were any other branches besides these three, then on these "extra" branches there would be one toy each, which contradicts the condition. Thus, there were 3 branches, and accordingly, 4 toys.
## Answer
3 branches, 4 toys.