Traditional Culture Encyclopedia - Hotel franchise - The equation of staying in a hotel

The equation of staying in a hotel

Let's rent rooms X, Y, Z, Y, Z for two, three and four people.

x+y+z=7 ┅┅( 1)

2x+3y+4z=20 ┅┅(2)

(2)-( 1)*2: y+2z=6 z=3-y/2。

Since x, y, z y and z are all positive integers, y=2 or y=4.

When y=2, z = 2 and x = 3.

When y=4, z = 1 and x = 2.

The checking calculation shows that both of them accord with the meaning of the problem.