Wrong answer on elementary diophantine equation - why?

62 Views Asked by At

Solve the equation and show all possible, non-negative values for X and Y: $5X+4Y=60$

So I wanted to do it like that: $$5X+4Y=60\leftrightarrow0X+4Y=0 \pmod5$$, thus $4Y=5k$ where $k\in Z$. Similarly: $$5X+5k=60\leftrightarrow X=12-k$$ However, in my textbook I find that at this stage, I should get to $$X=60-4k, \\ Y=-60+5k$$

Why doesn't the method of diving coefficients modulo work here?