We can first find the number of different types of candy he got:
The number of sugar candy he got:
34×8
=272
The number of chocolate candy he got:
34×4
=136
We can then add them all up to find the total pieces of candy he got:
272+136+34
=442
Therefore, the answer is 442.
Hope it helps!