Let the number of students in the hostel be 'x'.
Quantity of rice consumed by each student = 400 gm.
So, daily rice consumption in the hostel mess = 400(x).
But, daily rice consumption = 50 kg = 50 1000 = 50000 gm [since 1 kg = 1000 gm].
According to the question,
400x = 50000
Dividing both sides by 400, we get
=>
=> x = 125
Thus, 125 students have their meals in the hostel mess.