It is known that the solutions of X + y = m and 5x + 3Y = 31 are nonnegative, and the value of integer m is obtained Get the value

It is known that the solutions of X + y = m and 5x + 3Y = 31 are nonnegative, and the value of integer m is obtained Get the value

x+y=m (1)
5x+3y=31(2)
(1) X 3 = 3x + 3Y = 3M (3)
(2) (3) get 2x = 31-3m
x=(31-3m)/2
Substitute (1) to get
y=(5m-31)/2
∵ the solution is nonnegative
∴﹛(31-3m)/2≥0 m≤31/3
(5m-31)/2≥0 m≥31/5
∴31/5≤m≤31/3
∵ m is an integer
∴m=7, 8, 9, 10