4. A reservoir contains 400 tons of water. At midnight every day, the inlet and outlet gates are opened simultaneously. The amount of water $w$ (tons) flowing out through the outlet gate is a function of time $t$ (hours): $w=120 \sqrt{6 t}(0 \leqslant t \leqslant 24)$.
(1) If the reservoir is to contain 400 tons of water again at midnight the next day, how many tons of water should be added to the reservoir per hour (assuming the amount of water added per hour is constant)?
(2) Under the conditions of (1), at what time of the day will the reservoir contain the least amount of water, and how many tons of water will be in the reservoir at that time?
4. (1) Let the water inflow per hour be $m$ tons, then $24 m=120 \sqrt{6 \times 24}$, which gives $m=60$;
(2) Let the amount of water in the pool at time $t$ of the day be $y$ tons, then $y=400+60 t-120 \sqrt{6 t}$. Let $x=\sqrt{6 t}$, then $y=10 x^{2}-120 x+400=10(x-6)^{2}+40$. When $x=6$, i.e., $t=6$, $y_{\text {min }}=40$.