Can you solve this Diophantine equation really fast: $31x + 30y + 29z = 366$

327 Views Asked by At

Is there a "trick" to finding a solution $(x,y,z)$ of the Diophantine equation $$31x + 30y + 29z = 366$$ where $0 \leq z \leq y \leq x $?

3

There are 3 best solutions below

1
On BEST ANSWER

Hint: How many months have $31$ days? $30$ days? $29$ days?

0
On

Solving $(N+1)x + Ny = M$ is the same as dividing $M$ by $N$: $366 = 30*12 + 6 = 31*6 + 30*6$. $z$ equals $0$.

2
On

$$31*6=186$$

Then see $60=31+29$ and you can sum $30$'s and $60$'s to get the condition.

$$366=31*7+30*4+29*1$$