Word problem with multiple variables

I have the following word problem:

Bob received 21 gifts in total for his birthday. He got video games, CDs, snack bars, and sudoku books. He received 3 times as many CDs as video games, and twice as many sudoku books as snack bars. How many of each gift did he receive?

The problem can easily be solved by testing numbers, but is there any formulaic way to do so?

EDIT: Question mark

$$V+C+A+U=21\\C=3V\\U=2A$$So we can say $$V+3V+A+2A=21\\4V+3A=21$$
From here, you cannot directly solve this without an additional piece of information, but you can guess and check how many sums of a multiple of 4 and a multiple of 3 equal 21. One such sum is, $12+9$. $$4(3)+3(3)=21\\9+3+3+6=21$$
Pile the CDs and video games together. The number of items in the pile must be a multiple if what? Pile the others together. The number must be a multiple of what? You can write a Diaphontine equation for this, adding to $21$ Now if you consider divisibility by $3$ you will be guided. There are two solutions (if you don't insist that he got at least one of each thing).