31. How many triples of non-negative integers $(x, y, z)$ satisfying the equation
$$
x y z+x y+y z+z x+x+y+z=2012 ?
$$
31. Answer: 27.
$$
(x+1)(y+1)(z+1)=2013=3 \times 11 \times 61 .
$$

If all $x, y, z$ are positive, there are $3!=6$ solutions.
If exactly one of $x, y, z$ is 0 , there are $3 \times 6=18$ solutions.
If exactly two of $x, y, z$ are 0 , there are 3 solutions.
$$
6+18+3=27 \text {. }
$$