Find a solution to the equation:
29x + 30y + 31z = 366
Rem: x,y,z must be positive
(In reply to
Explanation to Puzzle Answer: Method 2 by K Sengupta)
29x+30y+31z=366
=> 31(x+y+z) + z-x = 366
=> x+y+z - (2x+y)/31 = 12 - 6/31
So, x+y+z=12
and, 2x+y=6
If x>=3, then from the second equation, we have:
y<=0.
This is a contradiction.
x =2 gives y=2, so that: z=12-4=8
x=1 gives y=4, so that: z=12-5= 7
Then, (x, y, z) = (2, 2, 8) and, (1, 4, 7) are the only possible solutions.