# Diophantine equations with three variables

Algebra Level pending

The equation $$29x + 30y + 31z = 366$$ has $$n$$ solutions $$(x,y,z)$$ where $$x,y,z$$ are positive (not necessarily distinct) integers.

If $$(X,Y,Z)$$ is the sole solution in which $$X,Y,Z$$ are all distinct, then find $$n + X + Y + Z$$.

×